我也有未启用此DPRP的问题。我在澳大利亚。我只是创建一个新的沙盒业务专业帐户。我找不到合适的位置来启用此DPRP内容。
我也对此进行了搜索。人们说应该启用“ DoDirectPayment API”,但我也找不到。
我使用了此SDK,并遵循了this page中的示例。
我在credit_card
中将付款方式更改为PayPal\Api\Payer
。这就是我所做的。
$payer = new Payer();
$payer->setPaymentMethod('credit_card');
$creditCard = new CreditCard();
... // Add credit card info here
$fundingInstrument = new FundingInstrument();
$fundingInstrument->setCreditCard($creditCard);
$payer->setFundingInstruments(array($fundingInstrument));
当我进行API调用时,出现以下错误:
[03-12-2018 17:15:55] PayPal\Core\PayPalHttpConnection : INFO: POST https://api.sandbox.paypal.com/v1/oauth2/token
[03-12-2018 17:15:56] PayPal\Core\PayPalHttpConnection : INFO: Response Status : 200
[03-12-2018 17:15:56] PayPal\Core\PayPalHttpConnection : INFO: POST https://api.sandbox.paypal.com/v1/payments/billing-plans/
[03-12-2018 17:15:58] PayPal\Core\PayPalHttpConnection : INFO: Response Status : 201
[03-12-2018 17:15:58] PayPal\Core\PayPalHttpConnection : INFO: PATCH https://api.sandbox.paypal.com/v1/payments/billing-plans/P-0P336233VT233871HOK2YJ7I
[03-12-2018 17:16:05] PayPal\Core\PayPalHttpConnection : INFO: Response Status : 200
[03-12-2018 17:16:05] PayPal\Core\PayPalHttpConnection : INFO: POST https://api.sandbox.paypal.com/v1/payments/billing-agreements/
[03-12-2018 17:16:10] PayPal\Core\PayPalHttpConnection : INFO: Response Status : 400
[03-12-2018 17:16:10] PayPal\Core\PayPalHttpConnection : ERROR: Got Http response code 400 when accessing https://api.sandbox.paypal.com/v1/payments/billing-agreements/. {"name":"DPRP_DISABLED","message":"DPRP is disabled for this merchant.","information_link":"https://developer.paypal.com/docs/api/payments.billing-agreements#errors","debug_id":"1e86f26a6d7b6"}
请为此提供一些帮助,并先谢谢您。