Post by d3z1gnr » Thu Jul 29, 2021 5:59 am

Hey folks.

Bit of a weird one that I cannot work out. When a new order is made, the customer activity is showing the new order twice (exact same time), and when dive into the report it shows a different IP address against the duplicated activity. I assume because of the payment callback.

Also, and I'd say related, the order alert is sent to the admin twice.

The site is using a Payment Express (Windcave) gateway that sets the order history as "processing". The default order status is "pending" in the system settings.

Does anyone know where I might be missing what could be causing this? I am assuming it is happening each time the order history is updated?

Thanks :)

Mike Little
Director / Developer / Makes the coffee
Creative Digital Limited
http://www.creativedigital.co.nz


User avatar
Active Member

Posts

Joined
Mon Jan 18, 2010 2:59 pm
Location - Auckland, New Zealand

Post by ADD Creative » Thu Jul 29, 2021 7:51 am

The event model/checkout/order/addOrderHistory/before should only add an activity if the order ID changes from 0.
https://github.com/opencart/opencart/bl ... #L222-L227

Could be some sort or race condition between the payment response and the callback it the both call addOrderHistory. Does it happen every time and with different payment modules?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by d3z1gnr » Thu Jul 29, 2021 9:14 am

ADD Creative wrote:
Thu Jul 29, 2021 7:51 am
Could be some sort or race condition between the payment response and the callback it the both call addOrderHistory. Does it happen every time and with different payment modules?
Yeah appears to be every time with the same payment gateway.

Mike Little
Director / Developer / Makes the coffee
Creative Digital Limited
http://www.creativedigital.co.nz


User avatar
Active Member

Posts

Joined
Mon Jan 18, 2010 2:59 pm
Location - Auckland, New Zealand

Post by FallingUp » Thu Jul 29, 2021 3:27 pm

It's the payment gateway that does this. I'm pretty sure

Newbie

Posts

Joined
Mon Jan 01, 2018 5:12 am

Post by JNeuhoff » Thu Jul 29, 2021 4:56 pm

You could check the server's access log to see what the exact logged requests are, and whether they originate from the payment gateway, and if so, perhaps twice. This way you'd get a clearer idea whether or not it is caused by the payment gateway.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by d3z1gnr » Thu Jul 29, 2021 5:19 pm

JNeuhoff wrote:
Thu Jul 29, 2021 4:56 pm
You could check the server's access log to see what the exact logged requests are, and whether they originate from the payment gateway, and if so, perhaps twice. This way you'd get a clearer idea whether or not it is caused by the payment gateway.
Yeah good point. Thanks, I will check.

Mike Little
Director / Developer / Makes the coffee
Creative Digital Limited
http://www.creativedigital.co.nz


User avatar
Active Member

Posts

Joined
Mon Jan 18, 2010 2:59 pm
Location - Auckland, New Zealand
Who is online

Users browsing this forum: alanjones and 84 guests