【发布时间】:2014-02-02 23:39:49
【问题描述】:
我正在创建一个纯 html 的 eshop,并希望创建一个 html 表单,用户可以在其中添加产品信息和图片。我打算使用贝宝进行支付处理,我想知道是否可以为每个产品创建贝宝按钮,而无需访问贝宝网站。 paypal 是否允许通过 javascript api 甚至使用 iframe 创建按钮?
【问题讨论】:
标签: javascript paypal forms
我正在创建一个纯 html 的 eshop,并希望创建一个 html 表单,用户可以在其中添加产品信息和图片。我打算使用贝宝进行支付处理,我想知道是否可以为每个产品创建贝宝按钮,而无需访问贝宝网站。 paypal 是否允许通过 javascript api 甚至使用 iframe 创建按钮?
【问题讨论】:
标签: javascript paypal forms
Buy Now按钮可以通过javascript生成,这里是the documentation
PAYPAL.apps.ButtonFactory.create(business, data, type, parentNode)
创建并返回一个包含按钮代码的 HTML 元素。
business - A string containing either the business ID or the business email data - A JavaScript object containing the button variables type - The button type, e.g. "buynow", "cart", "qr" parentNode - An HTML element to add the newly created button to (Optional)
【讨论】: