Skip to content

Commit

Permalink
Fix undefined index error
Browse files Browse the repository at this point in the history
checking the authorization_amount causes a PHP Undefined Index-error if you do not set an authorization_amount
  • Loading branch information
doctordebug authored Feb 11, 2019
1 parent 35202e0 commit 1fe8f14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AmazonPay/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ public function confirmOrderReference($requestParameters = array())
'mws_auth_token' => 'MWSAuthToken'
);

if ($requestParameters['authorization_amount'] && !$requestParameters['currency_code']) {
if (isset($requestParameters['authorization_amount']) && !isset($requestParameters['currency_code'])) {
$requestParameters['currency_code'] = strtoupper($this->config['currency_code']);
}

Expand Down

0 comments on commit 1fe8f14

Please sign in to comment.