使用Paypal的响应代码400

时间:2016-06-04 06:56:47

标签: paypal

我有问题。以下错误是什么意思?

[03-06-2016 06:39:03] PayPal\Core\PayPalHttpConnection: INFO	: Response Status 	: 201
[03-06-2016 06:39:46] PayPal\Core\PayPalHttpConnection: INFO	: POST //api.paypal.com/v1/oauth2/token
[03-06-2016 06:39:47] PayPal\Core\PayPalHttpConnection: INFO	: Response Status 	: 200
[03-06-2016 06:39:47] PayPal\Core\PayPalHttpConnection: INFO	: GET //api.paypal.com/v1/payments/payment/PAY-6H11042662505992DK5I45RY
[03-06-2016 06:39:48] PayPal\Core\PayPalHttpConnection: INFO	: Response Status 	: 200
[03-06-2016 06:39:48] PayPal\Core\PayPalHttpConnection: INFO	: PATCH //api.paypal.com/v1/payments/payment/PAY-6H11042662505992DK5I45RY
[03-06-2016 06:39:49] PayPal\Core\PayPalHttpConnection: INFO	: Response Status 	: 200
[03-06-2016 06:39:49] PayPal\Core\PayPalHttpConnection: INFO	: POST //api.paypal.com/v1/oauth2/token
[03-06-2016 06:39:50] PayPal\Core\PayPalHttpConnection: INFO	: Response Status 	: 200
[03-06-2016 06:39:50] PayPal\Core\PayPalHttpConnection: INFO	: GET //api.paypal.com/v1/payments/payment/PAY-6H11042662505992DK5I45RY
[03-06-2016 06:39:51] PayPal\Core\PayPalHttpConnection: INFO	: Response Status 	: 200
[03-06-2016 06:39:51] PayPal\Core\PayPalHttpConnection: INFO	: POST //api.paypal.com/v1/payments/payment/PAY-6H11042662505992DK5I45RY/execute
[03-06-2016 06:39:52] PayPal\Core\PayPalHttpConnection: INFO	: Response Status 	: 400
[03-06-2016 06:39:52] PayPal\Core\PayPalHttpConnection: ERROR	: Got Http response code 400 when accessing //api.paypal.com/v1/payments/payment/PAY-6H11042662505992DK5I45RY/execute. {"name":"PAYMENT_NOT_APPROVED_FOR_EXECUTION","message":"Payer has not approved payment","information_link":"//developer.paypal.com/docs/api/#PAYMENT_NOT_APPROVED_FOR_EXECUTION","debug_id":"dbfc0523997d7"}

1 个答案:

答案 0 :(得分:-2)

你可以only execute a Payment that has been approved by the customer

要检查付款是否已获批准look it up,并确保其state属性的值为"approved"