【问题标题】:PayPal Description Javascript贝宝 说明 Javascript
【发布时间】:2015-07-01 04:39:55
【问题描述】:

我目前正在 appery.io 中创建一个应用程序,并且我已经将 PayPal RESTApi 实现到其中。一切都正常运行,但我无法让我的描述/订单摘要看起来正确....目前我有这个

var sReturn ='';
sReturn +="Recipient: "+ localStorage.getItem('giftcard_recipient');
sReturn +="Recipient Email: "+ localStorage.getItem('giftcard_email');
sReturn +="Card Type: "+ localStorage.getItem('giftcard_type');
sReturn +="Card Amount: "+ localStorage.getItem('nPrice');
sReturn +="Note: "+ localStorage.getItem('giftcard_note');
return sReturn;

这反过来会导致这个......

我不知道如何让贝宝订单摘要看起来像我看到的很多,例如...

【问题讨论】:

    标签: javascript paypal paypal-sandbox paypal-rest-sdk


    【解决方案1】:

    我真的不知道这如何与应用程序一起使用,但在带有购物车的普通网站上,您需要向贝宝发送几个隐藏字段才能获得所需的结果。其中一些是必需的,一些是可选的。对你来说最重要的可能是:

    <input type="hidden" name="cmd" value="_cart" />

    查看此网站了解更多选项: Paypal Developer Site

    关于如何构建购物车并通过 jQuery 将其发送到 Paypal 有一个很好的教程: Creating a client-side shopping cart

    【讨论】:

      猜你喜欢
      • 2016-03-20
      • 2013-08-27
      • 2011-07-25
      • 2014-03-23
      • 2011-02-21
      • 2017-06-05
      • 2014-09-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多