Oh, RTM... I found the answer in the Integration Guide. When you make the Authorize call, you have to specify SellerAuthorizationNote:
{"SandboxSimulation": {
"State":"Declined",
"ReasonCode":"InvalidPaymentMethod",
"PaymentMethodUpdateTimeInMins":5}}
Leaving question here for developers integrating this payment method.
This is what the final method looks like:
/**
* @param string $orderReferenceId
* @param string $authorizationReferenceId
* @param float $amount
* @param string $currencyCode
* @return \OffAmazonPaymentsService_Model_AuthorizeResponse
*/
private function authorizeOrder($orderReferenceId, $authorizationReferenceId, $amount, $currencyCode)
{
return $this->getClient()->authorize([
'SellerId' => $this->serviceCrendentials['merchantId'],
'AmazonOrderReferenceId' => $orderReferenceId,
'AuthorizationReferenceId' => $authorizationReferenceId,
'AuthorizationAmount' => [
'Amount' => $amount,
'CurrencyCode' => $currencyCode
],
// Delete it, it's just for sandbox testing
'SellerAuthorizationNote' => json_encode(['SandboxSimulation' => [
'State' => 'Declined',
'ReasonCode' => 'InvalidPaymentMethod',
'PaymentMethodUpdateTimeInMins' => 5
]])
]);
}