简体   繁体   English

发票PayPal-PHP-SDK中的Paypal notify_url

[英]Paypal notify_url in invoice PayPal-PHP-SDK

i'm using CreateInvoice.php this code for creating paypal invoices. 我正在使用CreateInvoice.php这段代码来创建贝宝发票。 But problem is just like express checkout and formal paypal checkout i can't figure out how to add notify_url , cancel_url , return_url while creating invoices. 但是问题就像快递结帐和正式的贝宝结帐一样,我无法弄清楚在创建发票时如何添加notify_urlcancel_urlreturn_url

And in samples i can't find how to accomplish this job. 在样本中,我找不到完成这项工作的方法。

The parameters you are asking about are not relevant to the invoicing API. 您询问的参数与发票API不相关。

notify_url is to specify an IPN URL. notify_url用于指定IPN URL。 The REST API does not use IPN, though. REST API不使用IPN。 Instead, it uses Webhooks . 相反,它使用Webhooks You can register those manually within your REST App in your PayPal developer account, or you can set them up with the API. 您可以在REST应用程序中的PayPal开发人员帐户中手动注册它们,也可以使用API​​进行设置。

cancel_url and return_url are used with things like the checkout APIs so that PayPal knows where to send the user when they make those actions. cancel_urlreturn_url与诸如checkout API之类的东西一起使用,以便PayPal在执行这些操作时知道将用户发送到哪里。 The CreateInvoice invoice API would not need this, though, because there is no redirect to PayPal / login happening with the user. 不过,CreateInvoice发票API不需要此功能,因为用户没有发生重定向到PayPal /登录的情况。

Instead, it's simply using your API credentials to create the invoice and give you a success or fail result. 相反,它只是使用您的API凭据来创建发票并为您提供成功或失败的结果。 Based on that result you can redirect wherever you want. 根据该结果,您可以重定向到所需的任何位置。 Again, you're never leaving your app in this case, so you don't need to specify where to be sent back. 同样,在这种情况下,您永远不会离开应用程序,因此您无需指定发送回的位置。

Hope that helps. 希望能有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM