Php 如何测试亚马逊支付授权的偏差?

Php 如何测试亚马逊支付授权的偏差?,php,testing,amazon-pay,Php,Testing,Amazon Pay,在Amazon Payments上授权订单时,如果客户必须登录到Amazon Payments并更改付款方式,则授权状态可能会返回为已拒绝,原因为无效付款方式 如何强制Amazon复制此无效支付方法案例进行测试?哦,RTM。。。我在书里找到了答案。进行授权调用时,必须指定SellerAuthorization注意: {"SandboxSimulation": { "State":"Declined", "ReasonCode":"InvalidPaymentMethod",

在Amazon Payments上授权订单时,如果客户必须登录到Amazon Payments并更改付款方式,则授权状态可能会返回为
已拒绝
,原因为
无效付款方式


如何强制Amazon复制此
无效支付方法
案例进行测试?

哦,RTM。。。我在书里找到了答案。进行授权调用时,必须指定SellerAuthorization注意:

{"SandboxSimulation": {
     "State":"Declined",
     "ReasonCode":"InvalidPaymentMethod",
     "PaymentMethodUpdateTimeInMins":5}}
将问题留给集成此支付方法的开发人员

这是最终方法的外观:

/**
 * @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
        ]])
    ]);
}

我想你需要在你的问题中添加更多的细节,也许包括一些你需要的功能代码?请联系Amazon Payments并与他们解决。PCI compliance中有某些属性,等等,他们可能会发送数据,也可能不会。对不起,我已经找到了答案。请保持问题的简单性,并尝试用第三人称来关注这个问题。把它放到上下文和问题中去可能会有所帮助。