You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CleanUpIncompleteSessions cron should be run without any error.
What happened instead
When the CleanUpIncompleteSessions cron job runs, it throws the following error: Error in log: ERROR strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in vendor/amzn/amazon-pay-api-sdk-php/Amazon/Pay/API/Client.php on line 43
Steps to reproduce the issue
Setup Amazon pay configuration at website specific.
Authorization Mode should be set to 'Immediate' in the admin configuration for Amazon Pay payment
Added a product to the cart
Go to the cart page, and click on the Amazon Pay button to proceed to checkout.
Use a credit card in Amazon Pay where the payment is declined.
Place the order but do not click on the 'Cancel and return to merchant' link and close the window.
Run the amazon_pay_cleanup_sessions cron job using n98 command and it will throw error
After passing the transaction store the cron job completed without any errors, and the order status was updated to "Cancelled". $amazonSession = $this->amazonPayAdapter->getCheckoutSession($transactionData['store_id'], $checkoutSessionId);
The text was updated successfully, but these errors were encountered:
mohit-sharma-rp
changed the title
Issue: Order status stuck in payment review for incomplete transation.
Issue: CleanUpIncompleteSessions cron fails.
Oct 7, 2024
Interesting find, I'm a little surprised this hasn't come up yet... certainly looks like that call couldn't succeed without supplying the store code. You're more than welcome to open a PR for this issue if you'd like; we wouldn't merge it directly but could cherry pick your code into our next release branch if everything looks good. Thanks again for the report!
What I expected
CleanUpIncompleteSessions
cron should be run without any error.What happened instead
When the
CleanUpIncompleteSessions
cron job runs, it throws the following error:Error in log: ERROR strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in vendor/amzn/amazon-pay-api-sdk-php/Amazon/Pay/API/Client.php on line 43
Steps to reproduce the issue
amazon_pay_cleanup_sessions
cron job using n98 command and it will throw errorYour setup
More details about the issue:
The error occurs when the cron job runs to clean up incomplete transactions at this line: https://github.com/amzn/amazon-payments-magento-2-plugin/blob/5.17.1/Cron/CleanUpIncompleteSessions.php#L122
A
null
value is passed to thegetCheckoutSession
method, causing the error and preventing the cron job from completing.Solution:
After passing the transaction store the cron job completed without any errors, and the order status was updated to "Cancelled".
$amazonSession = $this->amazonPayAdapter->getCheckoutSession($transactionData['store_id'], $checkoutSessionId);
The text was updated successfully, but these errors were encountered: