[英]How to transform PayPal Classic Payment form into PayPal REST API PHP Application?
The following is the simplest PayPal interface form: 以下是最简单的PayPal界面形式:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" />
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="business" value="JohnDoe2@example.com" />
<input type="hidden" name="item_name" value="Purchase at the Virtual Store" />
<input type="hidden" name="item_number" value="Organic-001" />
<input type="hidden" name="amount" value="17.4" />
<input type="hidden" name="currency_code" value="EUR" />
<input type="hidden" name="notify_url" value="http://www.example.com/paypalnotify.php" />
<input type="submit" name="submit" value="Pay now By PayPal" />
</form>
This form is specific to a PayPal premier business account and a given amount to pay, with following key parameters: 该表格特定于PayPal高级企业帐户和给定的付款金额,并具有以下关键参数:
By clicking on the [submit] button, it perfoms this: 通过单击[提交]按钮,可以执行以下操作:
Now in the new interface using PalPal REST API, using PHP development kit , how one has to proceed to accomplish the payment ? 现在,在使用PalPal REST API的新界面和PHP开发工具包中 ,如何进行付款?
There are a few options. 有一些选择。 Start by looking at the code in these files:
首先查看这些文件中的代码:
https://github.com/paypal/rest-api-sdk-php/blob/master/sample/payments/CreatePayment.php https://github.com/paypal/rest-api-sdk-php/blob/master/sample/payments/CreatePaymentUsingPayPal.php https://github.com/paypal/rest-api-sdk-php/blob/master/sample/payments/CreatePayment.php https://github.com/paypal/rest-api-sdk-php/blob/master /sample/payments/CreatePaymentUsingPayPal.php
Obviously they don't have any interactive forms, but they show the general process. 显然,它们没有任何交互形式,但是它们显示了一般过程。 Dig in and work through creating your code.
深入研究并创建代码。 Then when you hit problems, open a new question with the specific issues.
然后,当您遇到问题时,请针对具体问题打开一个新问题。 StackOverflow is not for "how do I" type questions.
StackOverflow不适用于“我如何”类型的问题。 https://stackoverflow.com/help/on-topic
https://stackoverflow.com/help/on-topic
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.