PayPal REST API not returning recurring payment information in laraval

六眼飞鱼酱① 提交于 2021-01-29 09:56:18

问题


I am working on Paypal webhook (subscription) section to insert recurring payment information into the database. I have done coding based on the link "https://jslim.net/blog/2018/01/22/PayPal-Rest-API-with-Laravel-5-and-Angular/" but Paypal webhook always return “payment_status: Pending” on sandbox image and its not inserting recurring payment information into the database (insert option added in PayPalController - function webhooksPaymentSaleCompleted ).

I think the problems related with routes/api.php file but I can't figure out what exactly is going wrong.

Another URL that I have referred and tried was "https://github.com/supermavster/PayPal-PHP-SDK"

Laravel version 5.8 paypal/rest-api-sdk-php: "^1.14"

Please suggest a feasible solution to this problem.

Thanks in advance.


回答1:


Verify that the sandbox account's email is confirmed, by logging into the sandbox business account receiving the payment and navigating to: https://www.sandbox.paypal.com/businessprofile/settings/email

Resend the confirmation message. Open the message via https://developer.paypal.com/developer/notifications/ , and confirm the sandbox email.


The v1 PayPal-PHP-SDK is deprecated and there is no reason to be using it for a new integration. Use the v2 Checkout-PHP-SDK for payments.

You'll need two routes on your server, one for 'Set Up Transaction' and one for 'Capture Transaction', documented here; https://developer.paypal.com/docs/checkout/reference/server-integration/

The best approval flow to pair it with is https://developer.paypal.com/demo/checkout/#/pattern/server



来源:https://stackoverflow.com/questions/64060281/paypal-rest-api-not-returning-recurring-payment-information-in-laraval

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!