PayPal REST API未在laraval中返回定期付款信息 [英] PayPal REST API not returning recurring payment information in laraval

查看:156
本文介绍了PayPal REST API未在laraval中返回定期付款信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Paypal Webhook(订阅)部分,以将定期付款信息插入数据库.我已经基于链接"图像上返回"payment_status:待处理",并且不会重复插入付款信息到数据库中(在PayPalController中添加了插入选项-功能webhooksPaymentSaleCompleted).

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 ).

我认为问题与route/api.php文件有关,但我无法弄清楚到底是哪里出了问题.

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

我引用并尝试过的另一个URL是" https://github.com/supermavster/PayPal-PHP-SDK "

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

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

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

请提出解决该问题的可行方案.

Please suggest a feasible solution to this problem.

谢谢.

推荐答案

通过登录接收付款的沙盒业务帐户并导航至:

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

重新发送确认消息.通过 https://developer.paypal.com/developer/notifications/打开消息,并确认沙箱电子邮件.

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

v1 PayPal-PHP-SDK已弃用,没有理由将其用于新的集成.使用v2 Checkout-PHP-SDK进行付款.

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.

您在服务器上需要两条路由,一条用于设置交易",一条用于捕获交易",在此处记录; https://developer.paypal.com/docs/checkout/reference/server-integration/

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/

与之配对的最佳批准流程是 https://developer.paypal.com/demo/checkout/#/pattern/server

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

这篇关于PayPal REST API未在laraval中返回定期付款信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆