簡體   English   中英

ACH條紋銀行帳戶驗證

[英]ACH Stripe Bank Account Verification

我正在嘗試驗證Stripe的銀行帳戶。 Stripe文檔中最接近的語言是Node.js,因此我的代碼有些不同,但是存在一個問題,即從stripe.js創建的stripe對象上沒有“ customers”對象。

他們的代碼( https://stripe.com/docs/ach#manually-collecting-and-verifying-bank-accounts ):

// Set your secret key: remember to change this to your live secret key in production
// See your keys here: https://dashboard.stripe.com/account/apikeys
var stripe = require("stripe")("my_secret_key");

var data = {amounts: [32,45]}
stripe.customers.verifySource(
  'customer_id',
  'bank_account_id',
  {
    amounts: [32, 45]
  },
  function(err, bankAccount) {

});

我的代碼:

<script src="https://js.stripe.com/v3/"></script>
<script>
    $('input').on('keydown', function (e) {
        if (e.which == 13) {
            $('#VerificationAmounts').submit();
        }
    });

    $('#VerificationAmounts').submit(function (e) {
        e.preventDefault();
        var stripe = Stripe("@publishKey");

        var data = { amounts: [$('#Amount1').val(), $('#Amount2').val()] }
        debugger;
        stripe.customers.verifySource(
          '@customerId',
          '@bankAccount.Id',
          data,
          function (err, bankAccount) {

          });
    });
</script>

錯誤:

Uncaught TypeError: Cannot read property 'verifySource' of undefined

有誰知道一種使“客戶”對象填充在條紋對象上的方法?

根據@Alex的評論,我試圖使用stripe.js來驗證銀行帳戶,但是我應該一直在使用Stripe API。 由於我使用C# MVC我需要通過小額支付金額提供給我的控制器客戶和呼叫Verfiy該方法Stripe.netBankAccountService每文檔: https://github.com/stripe/stripe-dotnet

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM