1

我正在使用 GoCardless API 来获取客户的银行账户名称和他们帐号的最后两位数字。

我遵循了他们的指南并撤回了详细信息:

代码

  'access_token' => 'XXXXX-XXXXX',
  'environment'  => \GoCardlessPro\Environment::LIVE
));

$BankName=$client->customerBankAccounts()->get("BA000Q7C01AP71");

打印$BankName向我展示了类似于以下内容:

CustomerBankAccount Class stdClass Object ( [id] => BA000Q7C01AP60 [created_at] => 2020-01-21T20:56:53.381Z [account_number_ending] => 11 [account_holder_name] => S TEST [account_type] => [bank_name] => HSBC BANK LIMITED [currency] => GBP [country_code] => GB [metadata] => stdClass Object ( ) [enabled] => 1 [links] => stdClass Object ( [customer] => CU000QFVZRF7 ) )

我如何拆分这个字符串,因为我只想要[bank_name][account_number_ending]

无卡参考

4

0 回答 0