amazon-pay-sdk-php icon indicating copy to clipboard operation
amazon-pay-sdk-php copied to clipboard

Charge convenience method doesn't authorize - FIXED: needs to set a confirmOrder arg

Open b-yond opened this issue 6 years ago • 1 comments

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.

b-yond avatar Mar 15 '19 21:03 b-yond

I have noticed the same issue as @b-yond.

williamgalloh avatar Apr 01 '20 13:04 williamgalloh