stripe-payments - 将邮政编码和帐单地址添加到 strip 付款表单

标签 stripe-payments

我正在尝试在我的网站上设置 strip 支付
http://www.phpgang.com/how-to-integrate-stripe-payment-gateway-in-php-1_1027.html

我用演示和现场测试了它,它工作得很好,
但我正在尝试在表单中添加邮政编码
我想将用户帐单地址和邮政编码发送到 Stripe 以进行验证

<form action="charge.php" method="POST">
  <script src="https://checkout.stripe.com/checkout.js" class="stripe-button"
    data-key="pk_test_7JKeM9chawSzwFaDDJAxpa3K"
    data-image="http://www.phpgang.com/wp-content/themes/PHPGang_v2/img/logo.png"
    data-name="PHPGang.com"
    data-description="Download Script ($15.00)"
    data-amount="1500">
  </script>

</form>

最佳答案

条纹的Checkout表格有 configuration options .要收集邮政编码,只需添加 data-zip-code="true"到属性列表。这是一个 basic example .

请注意,邮政编码字段仅在需要时才会出现,因为并非所有国家/地区都使用它。 Checkout 使用卡号的前 6 位数字("BIN")来确定卡的国家/地区并显示或隐藏邮政编码字段。在上面的例子中,开始输入 424242卡号,该字段将出现。

关于stripe-payments - 将邮政编码和帐单地址添加到 strip 付款表单,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40117013/

相关文章:

javascript - Stripe 支付 : Getting Error as Customer cus_***** does not have a linked card with ID tok_*****

laravel - 使用 Laravel Cashier & Stripe 启动无卡预订阅

python - Flask中的Stripe Checkout流程如何携带userID这样的变量?

python - 将 Stripe 与 Flask 集成时,如何防止表单提交到服务器?

ruby-on-rails - 如何修复此错误 "undefined method ` 编码' for nil :NilClassa "and get canceling subscription plan worked?

ruby-on-rails - 在更新中从 Stripe 订阅中删除优惠券

javascript - Stripe account.create 返回 customer_id 而不是 account_id

java - 为什么 Java Stripe API 对于 receiveChangeCipherSpec() 有异常 NoSuchMethodError?

javascript - Stripe 充电未通过

azure - 在 Azure 上部署 Stripe 支付网关