View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007521 | module Amazon Pay | main | public | 2023-08-23 12:32 | 2023-09-11 16:59 |
Reporter | t.laube | ||||
Priority | immediate | Severity | critical | Reproducibility | random |
Status | resolved | Resolution | reopened | ||
Product Version | 2.0.0 | ||||
Target Version | 2.1.3 | Fixed in Version | 2.1.3 | ||
Summary | 0007521: amazon pay orders not getting exported from shop | ||||
Description | About 1-2% of orders with payment method amazon pay don't get cleared for export from the shop Capture method is two-step. It seems, that the function "processCharge" only reacts to the states "Pending" and "Captured". Sometimes the amazon API responds with state "Authorized". I believe, this shouldn't happen with two-step capture? ... ,"convertedAmount":null,"conversionRate":null,"channel":null,"chargeInitiator":null,"statusDetails": {"state":"Authorized","reasonCode":null,"reasonDescription":null, ... So there's either a bug in the module or amazon pay sometimes skips states for the order. | ||||
Steps To Reproduce | It seems to happen at random. Similarities in the data of the order or time of day aren't obvious. It happens almost every day at varying times. | ||||
Tags | No tags attached. | ||||
|
If a customer has set up the 2-step verification, it follows the sequence where an order is first authorised and later captured. If an ERP system does not take this sequence into account and always retrieves all information, there is a possibility that orders will be entered that are still in authorised status for the time being. Is this the case for you? -MF |
|
2-step authentification is set up. The current problem ist, that multiple orders don't get exported to the ERP System (while most of them do). In this setup the ERP System doesn't pull the orders, but the shop pushes them, when the status is correct. And sometimes the status deviates. So the ERP System doesn't have any information about the stuck orders and can't access them. |
|
We export orders, if: oxtransid != AMZ_PAYMENT_PENDING, oxfolder = ORDERFOLDER_NEW and oxtransstatus = NOT_FINISHED And we wonder, why on response of ORDER_STATE_OK or ORDER_STATE_MAILINGERROR the field oxfolder is set to ORDERFOLDER_PROBLEMS and oxtransid gets overwritten with AMZ_PAYMENT_PENDING. Maybe finalizeOrder in conjunction with updateAmazonPayOrderStatus could be reviewed? |
|
AMZ_PAYMENT_PENDING has not been used for a long time. Therefore, first try the current version v2.1.2 to see if it has the desired behavior. |
|
After a short review of the new version it seems, as if this behaviour hasn't changed: If an order gets the response 200 - completed, its status is set to "AmazonPay Authorisation still pending". When the next IPN sends 200 - Authorized, the module still only seems to react to "Pending" or "Captured" Ovrwrite of the oxtransid has just been reported in another Bug report, I believe. |
|
Hi, can you please provide a feedback to Mr. Laube? |
|
At the moment, we are having difficulty understanding the behavior you mention, as it doesn't seem to be occurring as described since the last changes. Could you please show us in more detail which section of the code you are referring to? Alternatively, since you say "it seems", what is it referring to. Then we'll take a look at it. |
|
function finalizeOrder sets oxtransid to AMZ_PAYMENT_PENDING and oxfolder to ORDERFOLDER_PROBLEMS via function updateAmazonPayOrderStatus, if the parent function returns ORDER_STATE_OK or ORDER_STATE_MAILINGERROR DispatchController: function init calls on IPN function processCharge. This only seems to react to "Pending" and "Captured". We got an "Authorize" on one order and nothing happened. |