2015-04-23 41 views
0

我目前在appery.io中创建了一个应用程序,并且我实现了PayPal RESTApi。一切运行正常,但我不能让我的介绍/为了总结一下正确的....目前我有这个贝宝描述Javascript

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; 

这在本回合中,结果.... current summary

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

回答

0

我真的不知道如何与应用程序一起工作,但在购物车的普通网站上,您需要发送一对夫妇隐藏的领域paypal得到你想要的结果。其中一些是必需的,一些是可选的。对你最重要的大概是:

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

看看这个网站了解更多选项: Paypal Developer Site

有关于如何建立一个购物车,并通过jQuery发送到贝宝一个很好的教程: Creating a client-side shopping cart