【问题标题】:Get the input card number field from Stripe Payment Modal从 Stripe Payment Modal 获取输入卡号字段
【发布时间】:2021-09-14 23:29:28
【问题描述】:

我想在条带模式中将占位符值从“卡号”更改为 1234*****5678。我该怎么做?

谢谢。

模态已由以下代码生成。

<script src="https://checkout.stripe.com/checkout.js" ></script>

var handler = StripeCheckout.configure({
        key: "",
        locale: 'english',
        image: '',
        panelLabel: 'Update Card',
        token: function(token) {
          
    });
    handler.open({
       name: "sitename",
       currency: 'USD',
    
       opened: function () {
       }
    });

【问题讨论】:

标签: javascript php stripe-payments


【解决方案1】:

Stripe Javascript 在自己的域上创建一个 iFrame,因此出于安全原因,您不能访问/编辑此类 iFrame 的 DOM。

想象一下,如果不是这种情况,您的页面可能会被允许获取客户的信用号码,这是一个很大的问题。

此外,请注意您使用的是过时版本的 Stripe,您应该考虑迁移到 newer version here

【讨论】:

  • 有什么方法可以使用客户ID从服务器获取卡号并将其放在那里?
  • 您永远无法获得卡号,因为这会使您的集成不符合 PCI 标准。看看这里:stripe.com/docs/security/guide
猜你喜欢
  • 2022-06-15
  • 1970-01-01
  • 2020-08-26
  • 2021-04-28
  • 2022-12-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-03-27
相关资源
最近更新 更多