是否可以通过 PayPal 进行“立即购买”?带有 HTML 表单的按钮?
我的网站上有一个 Google Checkout“立即购买”按钮。非常简单,我所做的就是以 HTML 表单生成订单信息:
<form action="https://checkout.google.com/cws/v2/Merchant/xxxxxxxxxx/checkoutForm" id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm">
<input name="item_name_1" type="hidden" value="Some Stuff">
<input name="item_description_1" type="hidden" value="Product">
<input name="item_quantity_1" type="hidden" value="1">
<input name="item_price_1" type="hidden" value="0.25">
<input name="item_currency_1" type="hidden" value="GBP">
<input name="item_name_2" type="hidden" value="Delivery">
<input name="item_description_2" type="hidden" value="standard">
<input name="item_quantity_2" type="hidden" value="1">
<input name="item_price_2" type="hidden" value="2.5">
<input name="item_currency_2" type="hidden" value="GBP">
<input name="_charset_" type="hidden" value="utf-8">
<input alt="" src="https://checkout.google.com/buttons/buy.gif?merchant_id=xxxxxxxxxx&w=117&h=48&style=white&variant=text&loc=en_US" type="image">
</form>
该表单是由一些 PHP 生成的,组装起来相当简单。有没有办法以同样的方式创建 PayPal 按钮?有些客户提出了要求,但我没有时间深入研究复杂的 API,而且静态保存的按钮也不好(客户填写一个简短的订单表格,然后生成按钮)。
I have a Google Checkout 'Buy Now' button on my site. It's very simple, all I do is produce the order information in an HTML form thus:
<form action="https://checkout.google.com/cws/v2/Merchant/xxxxxxxxxx/checkoutForm" id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm">
<input name="item_name_1" type="hidden" value="Some Stuff">
<input name="item_description_1" type="hidden" value="Product">
<input name="item_quantity_1" type="hidden" value="1">
<input name="item_price_1" type="hidden" value="0.25">
<input name="item_currency_1" type="hidden" value="GBP">
<input name="item_name_2" type="hidden" value="Delivery">
<input name="item_description_2" type="hidden" value="standard">
<input name="item_quantity_2" type="hidden" value="1">
<input name="item_price_2" type="hidden" value="2.5">
<input name="item_currency_2" type="hidden" value="GBP">
<input name="_charset_" type="hidden" value="utf-8">
<input alt="" src="https://checkout.google.com/buttons/buy.gif?merchant_id=xxxxxxxxxx&w=117&h=48&style=white&variant=text&loc=en_US" type="image">
</form>
This form is generated by a bit of PHP, it's fairly trivial to put together. Is there a way of creating a PayPal button in the same way? Some customers have requested it, but I don't have time to delve into complex APIs, and static saved buttons are no good (the customer fills out a short order form, which then generates the button).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是您要找的吗?
=> http://net.tutsplus.com/教程/html-css-techniques/creating-a-paypal- payment-form/
=> https://www.paypal.com/cgi-bin/webscr?cmd=_pdn_xclick_techview_outside
Is this what you´re looking for?
=> http://net.tutsplus.com/tutorials/html-css-techniques/creating-a-paypal-payment-form/
=> https://www.paypal.com/cgi-bin/webscr?cmd=_pdn_xclick_techview_outside