Re: Stripe payment module -Duplicate orders
Quote:
Originally Posted by
split63
2.1.9 Stripe_module_zc157c installed
Both Stripe and PayPal seem okay.
I ran a few test credit card orders thru stripe, all went okay. Once I hit the "continue" button on the 3rd checkout page, I then rapid clicked the "continue" button to see if I can create a duplicate order. It briefly displays "A processing error occurred." to the left of the "continue" button, but the order completes and there is no duplicate charge at stripe or at Zen.
However, directly after I click "continue" the first time, I see this text displayed to the left of the "continue" button: "TEXT_PAYMENT_STRIPE_PAYMENTSUCCEEDED". That seems odd.
All this is on my duplicate test site. I have yet to role it into my live site. :cheers:
Everything seem to be OK without "TEXT_PAYMENT_STRIPE_PAYMENTSUCCEEDED" message.
Open the page.
Admin page=>Tools=>SQL Query Executor
and paste following code to "Enter the query to be executed:" field and push "Send" button.
PHP Code:
insert into configuration (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`, `val_function`) VALUES
('Payment Succeeded Message:', 'TEXT_PAYMENT_STRIPE_PAYMENTSUCCEEDED', 'Payment succeeded. Please wait a few seconds!', 'The message will be displayed after payment succeeded. If you do not want to display it, leave it blank.', 6, 1, NULL, now(), NULL, NULL , NULL);
or upload mysql_upgrade_to_2.1.7.sql.
Go to Modules=>Payment Modules and select Stripe Payments.
Push "Edit" button.
Feel free to enter a message such as "Payment completed!" or "Zahlung erfolgreich!" or "お支払い完了しました!" in the field at the bottom.
Re: Stripe payment module -Duplicate orders
Quote:
Originally Posted by
Gozzandes
Everything seem to be OK without "TEXT_PAYMENT_STRIPE_PAYMENTSUCCEEDED" message.
Open the page.
Admin page=>Tools=>SQL Query Executor
You mean login to Zen Admin and Select: Tools => Install SQL Patches
Re: Stripe payment module -Duplicate orders
Quote:
Originally Posted by
split63
You mean login to Zen Admin and Select: Tools => Install SQL Patches
Yes.
TEXT_PAYMENT_STRIPE_PAYMENTSUCCEEDED is not installed in your database.
Re: Stripe payment module - PAYPAL IMPAIRED
Quote:
Originally Posted by
Gozzandes
Thanks!!
Change the following code
www\includes\modules\payment\stripe.php line 150
from
PHP Code:
if (MODULE_ORDER_TOTAL_LOWORDERFEE_STATUS == 'true' && MODULE_ORDER_TOTAL_LOWORDERFEE_ORDER_UNDER >= $order->info['total']) {
to
PHP Code:
if (MODULE_ORDER_TOTAL_LOWORDERFEE_LOW_ORDER_FEE == 'true' && MODULE_ORDER_TOTAL_LOWORDERFEE_ORDER_UNDER >= $order->info['total']) {
:blush:
When I rolled all this to the live site today, the low order fee issue got me again. I had to set the fee to 0.
It looks like the above did not make it into 2.1.9
I can confirm that the "TEXT_PAYMENT_STRIPE_PAYMENTSUCCEEDED" message was resolved with the SQL patch
Re: Stripe payment module - PAYPAL IMPAIRED
Quote:
Originally Posted by
split63
When I rolled all this to the live site today, the low order fee issue got me again. I had to set the fee to 0.
It looks like the above did not make it into 2.1.9
I can confirm that the "TEXT_PAYMENT_STRIPE_PAYMENTSUCCEEDED" message was resolved with the SQL patch
MODULE_ORDER_TOTAL_LOWORDERFEE_LOW_ORDER_FEE is Allow Low Order Fee.
Translate the code into English.
PHP Code:
if (MODULE_ORDER_TOTAL_LOWORDERFEE_LOW_ORDER_FEE == 'true' && MODULE_ORDER_TOTAL_LOWORDERFEE_ORDER_UNDER >= $order->info['total']) {
If you set "Allow Low Order Fee" to true and customer's order under ## dollar.
I will add ## dollar to total as a low order fee.
If you do not want to add low order fee, you should set "Allow Low Order Fee" to false.
1 Attachment(s)
Re: Stripe payment module - Duplicate order
With 2.1.9 installed for Zen 1.5.7c I just got another duplicate order.
This time it was a Link payment. The two orders are 3 minutes apart. Only the 2nd Link Payment shows in Zen as an order.
Attachment 20851
Re: Stripe payment module - Duplicate order
I contacted the customer to see if they had any insight into the Link Payment duplication
"I was called away while ordering and when I returned to finish the order the session had expired so I logged back in to finish"
How can the session expire in this situation in 3 minutes?
I have never used Link, so at checkout it does not show as an option. So I'm not clear what the customer sees or how a link payment can process without a Zen order being created
Re: Stripe payment module - Duplicate order
Quote:
Originally Posted by
split63
I contacted the customer to see if they had any insight into the Link Payment duplication
"I was called away while ordering and when I returned to finish the order the session had expired so I logged back in to finish"
How can the session expire in this situation in 3 minutes?
The customer claims he was called away for about 45 minutes. So the 1st and 2nd Stripe payments must have occurred when the customer returned, and the duplication was somehow put in motion by the Zen session timeout which perhaps occurred for Zen but not Stripe? :frusty:
Re: Stripe payment module - Duplicate order
Quote:
Originally Posted by
split63
The customer claims he was called away for about 45 minutes. So the 1st and 2nd Stripe payments must have occurred when the customer returned, and the duplication was somehow put in motion by the Zen session timeout which perhaps occurred for Zen but not Stripe? :frusty:
Thank you for reporting the problem
When disconnected the Zen cart session, redirect to the time out page.
\includes\templates\YOUR_TEMPLATE\templates\tpl_checkout_confirmation_default.ph p line 197 -216
from
PHP Code:
<!--------stripe-------->
<?php
$jason_stripe_select = json_encode($stripe_select);
?>
<script>
var stripe_select = JSON.parse('<?php echo $jason_stripe_select; ?>');
if (stripe_select === "True") {
document.getElementById('btn_submit').style.display ="none";
document.getElementById('checkout_confirmation').style.display ="none";
document.getElementById('payment-form','submit').display ="block";
}else{
document.getElementById('btn_submit').display ="block";
document.getElementById('checkout_confirmation').display ="block";
document.getElementById('payment-form','submit').style.display ="none";
}
</script>
<!--------end-stripe-------->
PHP Code:
<!--------stripe-------->
<?php
$jason_stripe_select = json_encode($stripe_select);
$jason_sess_life = json_encode($SESS_LIFE);
$timeoutURL = '"' . HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . 'index.php?main_page=time_out"';
?>
<script>
var stripe_select = JSON.parse('<?php echo $jason_stripe_select; ?>');
var sess_life = JSON.parse('<?php echo $jason_sess_life; ?>');
var timeoutURL = JSON.parse('<?php echo $timeoutURL; ?>');
if (stripe_select === "True") {
document.getElementById('btn_submit').style.display ="none";
document.getElementById('checkout_confirmation').style.display ="none";
document.getElementById('payment-form','submit').display ="block";
setTimeout(function(){window.location.href = timeoutURL;}, sess_life*1000);
}else{
document.getElementById('btn_submit').display ="block";
document.getElementById('checkout_confirmation').display ="block";
document.getElementById('payment-form','submit').style.display ="none";
}
</script>
<!--------end-stripe-------->
Re: Stripe payment module - Duplicate order
Quote:
Originally Posted by
Gozzandes
Thank you for reporting the problem
When disconnected the Zen cart session, redirect to the time out page.
\includes\templates\YOUR_TEMPLATE\templates\tpl_checkout_confirmation_default.ph p line 197 -216
According to Stripe:
To automatically expire unused Checkout Sessions, you can set the expires_at parameter when creating a Checkout Session. This parameter determines the expiration time of the session and can be set to any time between 30 minutes and 24 hours after the session is created. Once a Checkout Session reaches its expiration time without completion, it becomes inaccessible
The default expiration time for Stripe Checkout Sessions is 24 hours
Perhaps the easy fix is to set this parameter to just less than whatever the session time out is for Zen?
I don't see where it is ever set in the stripe code