adyen-magento2
adyen-magento2 copied to clipboard
[PW-6879] Expired payments Full order amount has not been authorized
Hi
We have some feedback on workflow for expired payments. We have backorders and because of local law we cannot invoice/capture items in an order before we ship them. Therefor we face a lot of expired payments in Adyen bakcend.
Issue 1) Right now we can reauthorize the payment that is expired, and if we insert the order number in the reference field, the webhook will ping our magneto 2 and we will get a new "AUTHORISATION webhook notification w/amount xxx" notification in the order. But now when we create an invoice an try to capture online we will get this error "Full order amount has not been authorized" "Unable to send capture request for order xxxx Full order amount has not been authorized". So why can we not do this?
To reproduce:
Create an order that is paid by CC in magento and let it authorize. The capture event is set to manual Do not capture the payment. Wait until the payment is expired (30 days) In Adyen find the expired payment. In Adyen Re-authorize the full amount of the payment and insert the order number from magento as reference and let the capture delay be blank so the payment not will be captured after Re-authorize The the new payment be Re-authorized and check the magento order. In magento The webhook will now have updated the PBS reference for the new authorized payment. Try to invoice the order and capture online The error will be present "Full order amount has not been authorized" when you try to create the invoice and the invoice will not be created and the payment will not be captured
Hi @dronerdk ,
Thank you for opening an issue with us.
Regarding the first issue, would you be able to open a ticket to our Tech Support linking this GitHub issue? The reason for that is we need to be able to check your logs to see how the notifications are processed. Furthermore, could you please specify the exact steps you have taken during the flow? This would be necessary to get a better understanding of the flow on your end.
As per the second issue, our plugin is notified that the capture failed with the CAPTURE
notification with success=false
. The synchronous API call to Adyen platform is successful, meaning that it comes through, however Adyen notifies Magento of the failed capture via the asynchronous flow. Our plugin therefore needs to rely on the asynchronous flow and to answer your request, cannot generate the error upon the synchronous call.
Kind regards, Rok, Adyen
Ok lets focus on issue 1 in this bug report.
To reproduce:
- Create an order that is paid by CC in magento and let it authorize.
- The capture event is set to manual
- Do not capture the payment.
- Wait until the payment is expired (30 days)
- In Adyen find the expired payment.
- In Adyen Re-authorize the full amount of the payment and insert the order number from magento as reference and let the capture delay be blank so the payment not will be captured after Re-authorize
- The the new payment be Re-authorized and check the magento order.
- In magento The webhook will now have updated the PBS reference for the new authorized payment.
- Try to invoice the order and capture online
- The error will be present "Full order amount has not been authorized" when you try to create the invoice and the invoice will not be created and the payment will not be captured
Hi @dronerdk ,
Thank you for your reply. Replicating this, I can confirm we are experiencing the issue on the latest version. The error seems to be coming from this line. Checking the isFullAmountAuthorized function, we are getting the order from getLinkedAdyenOrderPayments. It could be that we are trying to actually capture the PSP reference related to the expired authorisation instead of the correct one. I have opened an internal ticket and will be investigating this further.
Cheers, Rok, Adyen
Hi @dronerdk,
Following the call that was held between you and some of our team members I will be closing this issue while adding some information about an alternative to this issue, since the re-authorisation flow is a very limiting flow. Among other reasons of it being so limiting, is that different schemes and payment methods will have different deadlines of when an authorization will expire.
One of our suggestions would be to create a token on the initial payment and then use that token to process further MITs. Another would be to create ad-hoc MITs if the transaction expires. This can be done using our Pay by link functionality.
Regards, Jean Adyen