Update:
Issue 2
I have noticed that the first warning from issue 2 (undefined array key) has been previously fixed by gozzandes. See post #306 for details
Carlwhat has previously mentioned that line 69 of create.php could be removed – I believe this is correct, however line 179 of stripe.php would need to be changed to:
$order_comment = (isset($_SESSION['order_add_comment']))."\n Stripe ID:";
This will prevent the undefined array key warning from showing.
Issue 3
It appears issue 3 can be fixed by changing line 1 of includes/modules/pages/checkout_confirmation/jscript_stripe.php to
<?php if (isset($stripe_select) && MODULE_PAYMENT_STRIPE_STATUS === 'True' && $stripe_select == 'True' ) {?>
Issue 4
I believe issue 4 can be fixed by editing the tpl_checkout_confirmation.php file supplied with the stripe module:
change lines 157 – 166 to the following:
<?php if (MODULE_ORDER_TOTAL_INSTALLED && $_SESSION['payment'] != 'stripe') {
$order_totals = $order_total_modules->process();
}
?>
Other issues
Web developer console shows error at checkout – failed to load checkout_confirmation.css
Solution: remove line 2 from includes/modules/pages/checkout_confirmation/jscript_stripe.php
Web developer console shows that some files from stripe seem to have loaded twice. This causes a hcaptcha authentication error to appear in the console.
I have looked into the ‘cannot modify header information’ warning and have not found a solution yet. The cause appears to be <script> tags used at the end of the create.php file. The script code is as follows:
<script>
'use strict';
var clientS = JSON.parse('<?php echo $clientS_json; ?>');
var PublishableKey = JSON.parse('<?php echo $jason_publishable_key; ?>');
var confirmationURL = JSON.parse('<?php echo $confirmationURL; ?>');
var PaymentSuccess = JSON.parse('<?php echo $jason_PaymentSuccess; ?>');
</script>
Does anyone know if it would be possible to move the script elsewhere to prevent headers being modified?
Any help fixing this issue would be much appreciated.
Many thanks
Richard
Note: the edits I have made apply to version 2.0.1. The edits may be different for other versions.