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
Cannot Process Credit Memo - Deprecated functionality: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in /vendor/amzn/amazon-pay-magento-2-module/Gateway/Request/SettlementRequestBuilder.php on line 131
#1249
Open
amcguireweb opened this issue
Oct 17, 2024
· 1 comment
Error: Deprecated functionality:
rtrim(): Passing null to parameter #1 ($string) of type string is deprecated
in /vendor/amzn/amazon-pay-magento-2-module/Gateway/Request/SettlementRequestBuilder.php on line 131
Steps to reproduce the issue
Submit order with Amazon Pay as payment method, and then attempt to process a credit memo.
Your setup
Magento version: 2.4.6-p3
Amazon Pay Extension Version: 5.17.1
Magento Edition: Enterprise Cloud
Line 131: rtrim($paymentDO->getPayment()->getParentTransactionId(), '-capture'),
For some reason, $paymentDO->getPayment()->getParentTransactionId() = null here.
The text was updated successfully, but these errors were encountered:
This is a bit of a peculiar issue that we got a similar report of some months back... there should always be separate transactions recorded for authorizations and captures, but it appears that on some installations, a capture can be recorded in the sales_payment_transaction table without a parent auth. I've never been successful in reproducing this. But the auth transaction contains the Amazon Pay charge ID that we need to reference to properly process the refund through Amazon.
At any rate, I've come up with a patch that should identify the charge ID from information we have available in the capture transaction record in the case that there is no parent transaction. Please let us know if you continue to have issues with refunds!
What I expected
To process credit memo successfully.
What happened instead
Error: Deprecated functionality:
rtrim(): Passing null to parameter #1 ($string) of type string is deprecated
in /vendor/amzn/amazon-pay-magento-2-module/Gateway/Request/SettlementRequestBuilder.php on line 131
Steps to reproduce the issue
Submit order with Amazon Pay as payment method, and then attempt to process a credit memo.
Your setup
Line 131:
rtrim($paymentDO->getPayment()->getParentTransactionId(), '-capture'),
For some reason,
$paymentDO->getPayment()->getParentTransactionId()
=null
here.The text was updated successfully, but these errors were encountered: