在 Stripe Checkout 中隐藏电子邮件 [英] Hide email in Stripe Checkout

查看:35
本文介绍了在 Stripe Checkout 中隐藏电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 Stripe Payment 的 checkout.js 中禁用或隐藏电子邮件

How to disable or hide email in checkout.js in Stripe Payment

onStripeUpdate(e) {
    this.stripehandler.open({
      name: "",
      description: "",
      panelLabel: "Pay {{amount}}",
      allowRememberMe: false,
      email: "", //--->how to hide this email?
    });
    e.preventDefault();
  }

推荐答案

完全禁用电子邮件字段是不可能的.您可以为 email 配置选项传递一个值,但它必须是一个有效的电子邮件地址.如果是有效地址,则该字段将替换为具有您提供的值的静态标签.

It is not possible to disable the email field entirely. You can pass a value for the email configuration option, but it must be a valid email address. If it's a valid address, the field will be replaced by a static label with the value you provided.

如果您不提供 email 选项,或者您提供了无效值(例如示例代码中的空字符串),则电子邮件字段仍将显示.

If you don't provide the email option, or if you provide an invalid value (such as an empty string in your example code), then the email field will still be displayed.

这篇关于在 Stripe Checkout 中隐藏电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆