Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order "Processing" without payment #1186

Closed
mohammedTBB opened this issue Apr 27, 2023 · 7 comments
Closed

Order "Processing" without payment #1186

mohammedTBB opened this issue Apr 27, 2023 · 7 comments

Comments

@mohammedTBB
Copy link

What I expected

The order should have the status 'pending' if the payment is not received (not captured).

What happened instead

The Order placed with status processing

Your setup

  • Magento version: 2.4.5-p1
  • Amazon Pay Extension Version: 5.14.3
  • Magento Edition: Community

Details and screenshots

Order with no payment captured
order-1

order-1-status

Order with payment captured
order-2

order-2-status

@sgabhart22
Copy link
Contributor

Hello @mohammedTBB ,

This is the expected progression of order statuses with Amazon Pay as a payment method. If the module is configured to use Automatic authorization mode, then the order status may be 'Payment Review' until authorization can be attempted asynchronously via a cron job. Once Authorized, the status will become 'Processing'. Even after capture, the order status should remain 'Processing', until the order is shipped (which will make the order 'Complete') or refunded ('Closed').

Is the processing status upon authorization causing integration issues in your store?

Thanks,
Spencer

@mohammedTBB
Copy link
Author

Hello @sgabhart22

Yes, As the screenshots show, there is an order that is in status processing although it does not have payment (invoice),
which is a problem for us because we send these orders to another platform for management treating processing orders as already having payment.

We have authorization mode "immediate",
I understood that changing it to "automatic" will place the order in the status "payment review"
and after confirming the payment using the cron job the order status will be processing, is this correct?

@sgabhart22
Copy link
Contributor

Hi @mohammedTBB ,

Yes, generally speaking if the auth mode is Automatic, then the order status will become Payment Review immediately after the order is placed. There is a chance that the order may be authorized immediately if possible, as the Automatic mode passes a value of true to a property called canHandlePendingAuthorization, which means the auth may not happen right away.

I'm curious to know what value you have set for Payment Action? If it is set to 'Charge when the order is shipped', then the module will not attempt to capture/invoice automatically, meaning that the farthest the module will take a transaction is through the authorization. If you continue to have issues after setting auth mode to Automatic, you may need to set up a custom cron job to adjust the order status of outstanding Authorized Amazon Pay orders to Pending, if that is what your ERP/external order management system requires before invoicing.

Thanks,
Spencer

@mohammedTBB
Copy link
Author

Hi @sgabhart22

The payment is set to "Charge when the order is placed". and we change the Authorization mode to "Automatic",
I am going to monitor the orders and let you know if the automatic mode works for us.

Thanks,
Mohammed.

@mohammedTBB
Copy link
Author

Hi @sgabhart22

I confirm that changing the Authorization mode to "Automatic" solve the problem, thanks for your support!

Regards.

@darektw
Copy link

darektw commented Apr 29, 2024

Hello @sgabhart22

Today we are seeing a similar problem to the one described in this ticket.
Module versron: 5.17.0
Magento: 2.4.6-p5

I see that there are also errors such as this

var/log/paywithamazon.log-[2024-04-25T22:04:45.899437+00:00] amazonClientLogger.ERROR: 
Exception: Warning: Undefined variable $order in 
/var/www/magento/releases/20240424T160438/vendor/amzn/amazon-pay-magento-2-module/Model/CheckoutSessionManagement.php on line 781 
in /var/www/magento/releases/20240424T160438/vendor/magento/framework/App/ErrorHandler.php:62

Previously we had version 5.16.1 and everything worked fine.

@dimitriBouteille
Copy link
Contributor

@darektw I think you Can open new issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants