簡體   English   中英

PHP Stripe ACH驗證銀行帳戶

[英]PHP Stripe ACH verify bank account

Ive在有關ACH的條帶中遵循此文檔

這是代碼

// 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
\Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc');

// get the existing bank account
$bank_account = \Stripe\Customer::retrieveSource(
  'cus_AFGbOSiITuJVDs',
  'ba_17SHwa2eZvKYlo2CUx7nphbZ'
);

// verify the account
$bank_account->verify(['amounts' => [32, 45]]);

在我本地,我得到了這個錯誤

未捕獲的錯誤:調用未定義的方法Stripe_Customer :: retrieveSource()

如果要通過Stripe_Customer調用retrieveSource ,則您使用的是Stripe_Customer -php庫的非常舊的版本,該版本沒有retrieveSource方法。 最新版本使用語法\\Stripe\\Customer\\::retrieveSource

如果將Stripe庫更新為更新版本,則應該能夠像在文檔中一樣使用retrieveSource

暫無
暫無

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

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