【问题标题】:Paypal button customization boostrap likePaypal 按钮自定义引导程序,例如
【发布时间】:2018-04-07 16:57:00
【问题描述】:

我需要在网站上插入 2 个贝宝按钮:升级按钮和续订按钮。 根据新的贝宝参考,我使用了

paypal.Button.render

但定制非常有限。

 style: {
            label: 'checkout',
            size:  'small',    // small | medium | large | responsive
            shape: 'pill',     // pill | rect
            color: 'gold'      // gold | blue | silver | black
        },

我需要将按钮创建为引导程序

<button class="btn btn-danger"><i class="fa fa-shopping-cart" aria-hidden="true"></i> RENEW</button>

但 paypal 按钮在 iframe 中。

是否可以使用 jQuery 和 css 来获得这种效果?

【问题讨论】:

  • 您不能在 iframe 中更改样式。如果 iframe src 域名与父站点相同,则可以更改,但此处不能。

标签: jquery css twitter-bootstrap paypal express-checkout


【解决方案1】:

Try use this js library

frame.$('button').addClassName('btn btn-danger');

希望对你有帮助

【讨论】:

    【解决方案2】:

    不,出于安全原因,您不能更改来自其他来源的任何内容。比如iframe。 如果你需要这样做,我记得在 rest-API 中你可以使用服务器端编码来修改?或者不使用rest-API来制作,改成传统的form提交到paypal,可以自定义按钮。

    【讨论】:

      猜你喜欢
      • 2017-11-14
      • 2018-06-18
      • 1970-01-01
      • 1970-01-01
      • 2015-12-25
      • 2013-05-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多