Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/256.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP验证银行帐户_Php_Stripe Payments - Fatal编程技术网

PHP验证银行帐户

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

关于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_客户::retrieveSource()


如果您通过
Stripe\u Customer
调用
retrieveSource
,那么您使用的是一个非常旧的Stripe php库版本,它没有
retrieveSource
方法。较新的版本使用语法
\Stripe\Customer\::retrieveSource


如果您将条带库更新为最新版本,您应该能够使用文档中的
retrieveSource

如果我要使用最新版本,它是否会影响我使用的旧代码?比如API?很抱歉,我无法查看和比较旧版本的API return。您不必升级您的API版本,因为它向后兼容。您可能需要更新任何使用stripe php库的代码,因为绑定已经更改。