Álv*_*anz 6 php paypal paypal-rest-sdk
这不是这篇文章的副本。
我从链接的帖子中引用:
截至 2017 年 6 月 29 日,我认为这不起作用。Paypal 再次改变了它的规则,我认为它不再接受表单提交中隐藏的 HTML 字段:它们必须在 Paypal 的按钮编辑器中设置。
Paypal 文档一团糟。一半的链接已断开,另一半链接指向文档索引。
有没有人知道如何实现 Paypal 付款按钮,我可以在其中动态设置价格?
PayPal 建议使用 Express checkout 客户端集成,您可以将金额从您的网站动态发送到 PayPal 代码。
有关 PayPal Express 结账客户端集成,请参阅以下链接:
https://developer.paypal.com/demo/checkout/#/pattern/client
否则,请尝试使用以下 PayPal HTML 按钮代码。
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="Yourbusinessemail@paypal.com"> <!-- Add your PayPal Seller/Business email address Required-->
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value=""> <!-- Add Description e.g your room type Required-->
<input type="hidden" name="amount" value=""> <!-- Dynamically add Total Amount Required-->
<input type="hidden" name="currency_code" value=""> <!-- Update to your currency -->
<input id="invoice" type="hidden" value="" name="invoice"> <!-- Add Unique invoice for each transaction -->
<input type="hidden" name="notify_url" value="www.yourwebsite.com/ipn.php"> <!-- Please add IPN URL You can use this service to automate back-office and administrative functions, including fulfilling orders, tracking customers, and providing status and other information related to transactions. -->
<input type='hidden' name='cancel_return' value='' /> <!-- Take customers to this URL when they cancel their checkout -->
<input type='hidden' name='return' value='' /> <!-- Take customers to this URL when they finish their checkout -->
<!-- Display the payment button. -->
<input type="image" name="submit" border="0" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" alt="PayPal - The safer, easier way to pay online">
</form>
HTML Variables - https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/
Buy Now button - https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/buy_now_step_1/
IPN - https://developer.paypal.com/docs/classic/ipn/gs_IPN/
IPN - https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNSetup/
IPN Sample: https://github.com/paypal/ipn-code-samples
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
10190 次 |
| 最近记录: |