admin管理员组文章数量:1310922
$authResponse = Http::withToken($accessToken)->post("{$this->baseUrl}/v1/payments/payment", ["intent" => "authorize","payer" => ["payment_method" => "credit_card","funding_instruments" => [["credit_card_token" => ["credit_card_id" => $cardId]]]],"transactions" => [["amount" => ["total" => "1.00","currency" => "USD"],"description" => "Card verification test"]]]);`
When I call this api to authorise payment response is like
"Payee is Invalid"
Although at first I get token successfully if payee were invalid then why token api would be successfull.
$authResponse = Http::withToken($accessToken)->post("{$this->baseUrl}/v1/payments/payment", ["intent" => "authorize","payer" => ["payment_method" => "credit_card","funding_instruments" => [["credit_card_token" => ["credit_card_id" => $cardId]]]],"transactions" => [["amount" => ["total" => "1.00","currency" => "USD"],"description" => "Card verification test"]]]);`
When I call this api to authorise payment response is like
"Payee is Invalid"
Although at first I get token successfully if payee were invalid then why token api would be successfull.
Share Improve this question edited Feb 2 at 20:00 VLAZ 29.1k9 gold badges63 silver badges84 bronze badges asked Feb 2 at 8:44 The VottuxThe Vottux 211 bronze badge 1- log the entire request and entire response, in JSON format – Preston PHX Commented Feb 2 at 17:01
1 Answer
Reset to default 1The "Payee is Invalid" error usually indicates that the recipient (merchant account) specified for the transaction is incorrect or not eligible to receive payments. The token you received initially is only for authentication, not for transaction validation.
Ensure that your PayPal (or other payment provider) merchant account is set up correctly and is eligible to receive payments.
Make sure you are using the correct API URL for payments:
"{$this->baseUrl}/v1/payments/payment"
Make sure $this->baseUrl is set correctly (https://api.sandbox.paypal for testing or https://api.paypal for live).
本文标签: Paypal authorise rest api in phpStack Overflow
版权声明:本文标题:Paypal authorise rest api in php - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741853210a2401189.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论