条纹付款:收到错误,因为客户cus_*****没有ID tok_*****的链接卡
2022-08-30 10:29:36
在测试模式下,当我创建新客户并尝试付款时,我得到了这个错误。
客户cus_7Zz2BCnybIZLGw没有带身份证的关联卡tok_17Kp8GAwLkQPB7OqrrM73VVI
IM使用卡号 : 4242424242424242 exp_month :12 exp_year 2016
返回响应为:
Array
(
[charge_status] =>
[error_info] => Array
(
[type] => invalid_request_error
[message] => Customer cus_7Zz2BCnybIZLGw does not have a linked card with ID tok_17Kp8GAwLkQPB7OqrrM73VVI.
[param] => card
[code] => missing
)
[message] => Customer cus_7Zz2BCnybIZLGw does not have a linked card with ID tok_17Kp8GAwLkQPB7OqrrM73VVI.
)
输入电荷数据为,
$customer = Stripe_Customer::create(array(
'account_balance' => 100,
'source' => $token,
'email' => strip_tags(trim($email))
)
);
$customer_id = $customer->id;
$charge = array(
'card' => 4242424242424242,
'amount' => 100,
'currency' => 'cad',
'receipt_email' => test@test.com,
'description' => 'my payment',
'customer' => $customer_id
);