paypal express opening 2 orders ...
-
loop
- Contributor
- Posts: 253
- Joined: Thu Mar 25, 2021 12:26 pm
- Phoenix Version:
- Has thanked: 7 times
- Been thanked: 3 times
paypal express opening 2 orders ...
hi All
I have a strange thing. I installed paypal express (and other payment methods) and everything works, beside i had in the last 4 days, multiple time, whenn paypal orders (i have installed paypal express module) opens 2 orders_id in 2 to 6 seconds difference. i have only 1 payment, but 2 orders, one time it was 2 secodes difference and once 6 second.
I made a testorder, i also "double clicked" on the confirmation button, but i t always makes correct 1 order. but something strange must happen, to make 2 orders out of 1.
Does somebody has a idea whenn this could happend, how i can fix that?
I have a strange thing. I installed paypal express (and other payment methods) and everything works, beside i had in the last 4 days, multiple time, whenn paypal orders (i have installed paypal express module) opens 2 orders_id in 2 to 6 seconds difference. i have only 1 payment, but 2 orders, one time it was 2 secodes difference and once 6 second.
I made a testorder, i also "double clicked" on the confirmation button, but i t always makes correct 1 order. but something strange must happen, to make 2 orders out of 1.
Does somebody has a idea whenn this could happend, how i can fix that?
-
loop
- Contributor
- Posts: 253
- Joined: Thu Mar 25, 2021 12:26 pm
- Phoenix Version:
- Has thanked: 7 times
- Been thanked: 3 times
Re: paypal express opening 2 orders ...
Nobody gas this issue with double orders on paypal express module?
I wonderschöne if the reason / fix is to disable the confirm button after first click, but im not sure if the reason are 2 requests from confirmation page....
I wonderschöne if the reason / fix is to disable the confirm button after first click, but im not sure if the reason are 2 requests from confirmation page....
-
loop
- Contributor
- Posts: 253
- Joined: Thu Mar 25, 2021 12:26 pm
- Phoenix Version:
- Has thanked: 7 times
- Been thanked: 3 times
Re: paypal express opening 2 orders ...
I have now seen that in the paypal logfile there is in every case that i have double orders twice the enty for "doexpresscheckoutpayment" ...most time 0 to 3 seconds difference.
On the second entry i can view:
L_SHORTMESSAGE0Duplicate RequestL_LONGMESSAGE0A successful transaction has already been completed for this token.L_SEVERITYCODE0Warning
So the plugin notice that its a double order but still create 2 orders. Is this not a bug? Can anybody helps me to solve this issue? 90% of paypal express orders works just fine....only a couples i have double orders ( 1 time tripple order). Strange thing is that ib thr phoenix paypal log its written clearly thats already submited but still create a order..
Thanks for every help / hint
On the second entry i can view:
L_SHORTMESSAGE0Duplicate RequestL_LONGMESSAGE0A successful transaction has already been completed for this token.L_SEVERITYCODE0Warning
So the plugin notice that its a double order but still create 2 orders. Is this not a bug? Can anybody helps me to solve this issue? 90% of paypal express orders works just fine....only a couples i have double orders ( 1 time tripple order). Strange thing is that ib thr phoenix paypal log its written clearly thats already submited but still create a order..
Thanks for every help / hint
-
loop
- Contributor
- Posts: 253
- Joined: Thu Mar 25, 2021 12:26 pm
- Phoenix Version:
- Has thanked: 7 times
- Been thanked: 3 times
Re: paypal express opening 2 orders ...
I'm really stuck with this, does really nobody have the same issue?
I use Paypal Express and most orders are just fine, only once every 1-2 days i have a double order (1 payment, 2 orders_id) and in the logfile i see 2 DoExpressCheckoutPayment
and on the second i also see in the response, that
i really would appriciate any hints / tips or maybe tell me who did the paypal plugin, maybe this person can help me out.
I use Paypal Express and most orders are just fine, only once every 1-2 days i have a double order (1 payment, 2 orders_id) and in the logfile i see 2 DoExpressCheckoutPayment
and on the second i also see in the response, that
Code: Select all
TIMESTAMP 2022-08-17T14:54:37Z
CORRELATIONID b814134bbd822
ACK SuccessWithWarning
VERSION 204
BUILD 57439687
L_ERRORCODE0 11607
L_SHORTMESSAGE0 Duplicate Request
L_LONGMESSAGE0 A successful transaction has already been completed for this token.
L_SEVERITYCODE0 Warning-
ecartz
- Core Team
- Posts: 3084
- Joined: Tue Nov 05, 2019 6:02 pm
- Phoenix Version:
- Has thanked: 4 times
- Been thanked: 208 times
Re: paypal express opening 2 orders ...
Harald did the PayPal App as far as I know.
Of people here, @BrockleyJohn probably knows the most about it. Please note that he has no responsibility for the current PayPal Express module, so he would expect payment for diagnosing someone else's app.
Of people here, @BrockleyJohn probably knows the most about it. Please note that he has no responsibility for the current PayPal Express module, so he would expect payment for diagnosing someone else's app.
-
BrockleyJohn
- Certified Developer
- Posts: 173
- Joined: Mon Mar 01, 2021 5:37 pm
- Phoenix Version:
- : Buy Me A Beverage
- Has thanked: 2 times
- Been thanked: 31 times
Re: paypal express opening 2 orders ...
My guess is that an occasional muppet on your site is going clickety-click (double, triple) on the checkout confirmation button.
I have a basic hook that will put a stop to it - uploading to addons as soon as I can zip it.
Probably not the paypal app's fault at all (this time)
I have a basic hook that will put a stop to it - uploading to addons as soon as I can zip it.
Probably not the paypal app's fault at all (this time)
-
BrockleyJohn
- Certified Developer
- Posts: 173
- Joined: Mon Mar 01, 2021 5:37 pm
- Phoenix Version:
- : Buy Me A Beverage
- Has thanked: 2 times
- Been thanked: 31 times
Re: paypal express opening 2 orders ...
...just cos you can't reproduce it, doesn't mean they can't manage it!
-
BrockleyJohn
- Certified Developer
- Posts: 173
- Joined: Mon Mar 01, 2021 5:37 pm
- Phoenix Version:
- : Buy Me A Beverage
- Has thanked: 2 times
- Been thanked: 31 times
-
loop
- Contributor
- Posts: 253
- Joined: Thu Mar 25, 2021 12:26 pm
- Phoenix Version:
- Has thanked: 7 times
- Been thanked: 3 times
Re: paypal express opening 2 orders ...
Thank you BrockleyJohn!
i integrated it now and we will see if it's because of that ....
i had to modify a bit the code, as 1. i wanted / needed it only on the paypal module, as i have other paymentmodules which do not need to submit the form (lightboxes) and somehow i had a error about the formname, so i hardcoded the formname of the checkout, now it works for me
i integrated it now and we will see if it's because of that ....
i had to modify a bit the code, as 1. i wanted / needed it only on the paypal module, as i have other paymentmodules which do not need to submit the form (lightboxes) and somehow i had a error about the formname, so i hardcoded the formname of the checkout, now it works for me
Code: Select all
function listen_injectBodyEnd() // straight after footer scripts
{
Global $payment_modules, $formname;
//Bei Paypal only singleclick
if ($payment_modules->selected_module == "paypal_express") {
return <<<EOS
<script>
const cbtn = document.querySelector(".btn-success");
const icn = document.querySelector(".btn-success span");
const frm = document.querySelector('form[name="checkout_confirmation"]');
let press = 0;
cbtn.addEventListener('click', (e) => {
e.preventDefault();
if (frm.checkValidity()) {
if (press == 0) {
icn.classList.remove('fa-check-circle');
icn.classList.add('fa-spinner');
frm.submit();
}
press++;
} else {
frm.reportValidity();
}
});
</script>
EOS;
}
}-
loop
- Contributor
- Posts: 253
- Joined: Thu Mar 25, 2021 12:26 pm
- Phoenix Version:
- Has thanked: 7 times
- Been thanked: 3 times
Re: paypal express opening 2 orders ...
@BrockleyJohn it worked, since i made the "single click Workarround" i have no double orders from Paypal. - thank you!
One strange thing still happends:
if a customer use paypal express for account creating and he has special character in the adresse or name, something strange happends:
- customer account is correct with the special character "ä ö ü" for example but delivery and billing adress the character is not correct (the ääö is replaced with strange utf8 strange characters)
so the question is, why it's correct saved to the customer DB with the correct encoding but not in the orders table in the billing / shipping fields
any ideas how to fix that?
this problems only happends with paypal so it has to be something with this module....
thanks in advance!
One strange thing still happends:
if a customer use paypal express for account creating and he has special character in the adresse or name, something strange happends:
- customer account is correct with the special character "ä ö ü" for example but delivery and billing adress the character is not correct (the ääö is replaced with strange utf8 strange characters)
so the question is, why it's correct saved to the customer DB with the correct encoding but not in the orders table in the billing / shipping fields
any ideas how to fix that?
this problems only happends with paypal so it has to be something with this module....
thanks in advance!