首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Paypal现在按钮,可变/动态价格

Paypal现在按钮,可变/动态价格
EN

Stack Overflow用户
提问于 2017-07-05 14:19:26
回答 2查看 11.1K关注 0票数 6

这不是this post的复制。

我引述有关的职位:

从2017年6月29日起,我认为这是行不通的。Paypal再次改变了它的规则,我认为它不再接受表单提交中隐藏的HTML字段:它们必须在Paypal的按钮编辑器中设置。

Paypal文档是一团糟。一半的链接被破坏,另一半的链接指向文档索引。

有没有大脑知道如何实现一个贝宝支付按钮,我可以动态设定价格?

EN

回答 2

Stack Overflow用户

发布于 2017-07-07 12:35:46

PayPal建议使用快捷结帐客户端集成,您可以动态地将金额从您的网站发送到PayPal代码。

有关PayPal快捷签出客户端集成的链接如下:

https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/client-side-REST-integration/

https://developer.paypal.com/demo/checkout/#/pattern/client

否则,请尝试使用下面的PayPal HTML按钮代码。

代码语言:javascript
复制
<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 
票数 6
EN

Stack Overflow用户

发布于 2019-01-09 12:53:53

代码语言:javascript
复制
<form name="_xclick"  method="post" action= "https://www.paypal.com/cgi-bin/webscr">
  <input type="hidden" name="cmd" value="_xclick">
  <input type="hidden" name="business" value="xxx@jjdj.com">
  <input type="hidden" name="item_name" value="XXXX">
  <input type="hidden" name="notify_url" value="http://XXXXXXX.com/ipn.php" />
  <input type="hidden" id="buybuttonid" name="custom" value="XXXXX" />
  <input type="hidden" name="amount" value="amount that you want to send">
  <input type="submit" value="Buy Now">
</form>

请使用此按钮,不要传递项目编号和数量,然后它将不会动态设置数量。

只需创建简单的“立即购买”按钮,并在创建按钮时使价格/金额值变为空白。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44928825

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档