【发布时间】:2017-06-12 05:26:25
【问题描述】:
我有一个已激活的独立账户,它正在接受实时交易并连接到平台条带账户。我在下面给出了我用于接受实时付款的代码。
\Stripe\Stripe::setApiKey("LIVE_PLATFORM_API_KEY");
$strtok = \Stripe\Token::create(
array(
"card" => array(
"number" => $cardnumber,
"exp_month" => $cardexpmonth,
"exp_year" => $cardexpyear,
"cvc" => $creditcardcvv
)
),
array('stripe_account' => "live_account_header")
);
$strtoken = $strtok->id;
$charge = \Stripe\Charge::create(array(
'amount' => $amts,
'currency' => 'usd',
'application_fee' => $appfee,
'source' => $strtoken
), array('stripe_account' => "live_account_header"));
我想在我的代码中设置一个调试模式,该模式将使用条带测试密钥来接受测试事务,即使条带独立帐户和平台帐户都已激活并处于实时模式。我想要在调试而不是进行实时事务时应该使用的条带调用。我的意思是,当我突然想要进行测试交易而不是实时交易时,我应该如何更改上述代码并使用测试密钥,即使平台和独立帐户都已激活并生效?
【问题讨论】:
标签: stripe-payments stripe-connect stripe.net