amazon-pay-sdk-php
amazon-pay-sdk-php copied to clipboard
Charge convenience method doesn't authorize - FIXED: needs to set a confirmOrder arg
The confirmOrderReference function expects an 'authorization_amount' parameter.
You're setting this index for the authorize function in $authorizeParameters, but the confirmOrderReference will always return a Draft status without that parameter. If the status is "Draft", the authorize() function is never called, because of the condition in line 1428 if ($oroStatus['State'] === 'Open') {
I added this @ line 1368 and it worked fine: $confirmParameters['authorization_amount'] = $requestParameters['charge_amount'];
Let me know if you need any more explanation.
I have noticed the same issue as @b-yond.