【问题标题】:How to create paypal buttons from an html form?如何从 html 表单创建贝宝按钮?
【发布时间】:2014-02-02 23:39:49
【问题描述】:

我正在创建一个纯 html 的 eshop,并希望创建一个 html 表单,用户可以在其中添加产品信息和图片。我打算使用贝宝进行支付处理,我想知道是否可以为每个产品创建贝宝按钮,而无需访问贝宝网站。 paypal 是否允许通过 javascript api 甚至使用 iframe 创建按钮?

【问题讨论】:

    标签: javascript paypal forms


    【解决方案1】:

    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)
    

    【讨论】:

    • 我没看懂。创建按钮时没有paypal认证。你只需要知道商家的email就可以创建产品按钮。我是不是误会了什么?有没有教程解释了用这个库创建按钮的整个过程?谢谢
    猜你喜欢
    • 2018-06-03
    • 2012-05-19
    • 2011-03-20
    • 2020-08-31
    • 2017-12-21
    • 2014-11-30
    • 2011-07-17
    • 1970-01-01
    • 2020-03-17
    相关资源
    最近更新 更多