PHP验证银行帐户
关于ACH,我已经详细说明了这一点 这是密码PHP验证银行帐户,php,stripe-payments,Php,Stripe Payments,关于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 th
// 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_客户::retrieveSource()
如果您通过
Stripe\u Customer
调用retrieveSource
,那么您使用的是一个非常旧的Stripe php库版本,它没有retrieveSource
方法。较新的版本使用语法\Stripe\Customer\::retrieveSource
如果您将条带库更新为最新版本,您应该能够使用文档中的
retrieveSource
。如果我要使用最新版本,它是否会影响我使用的旧代码?比如API?很抱歉,我无法查看和比较旧版本的API return。您不必升级您的API版本,因为它向后兼容。您可能需要更新任何使用stripe php库的代码,因为绑定已经更改。