1
你好我使用下面的交易代碼如何取消條紋支付和借記錢給客戶帳戶
require_once('Stripe/lib/Stripe.php');
Stripe::setApiKey("<Api key>");
$customer = Stripe_Charge::create(array(
"amount" => 1500,
"currency" => "usd",
"card" => $_POST['stripeToken'],
"description" => "Charge for Facebook Login code."
));
echo "<pre>";print_r($customer);die;
// Charge the Customer instead of the card
$charge = Stripe_Charge::create(array(
"amount" => 1500,
"currency" => "usd",
"customer" => $customer->id)
);
echo 'Transaction Id '.$charge->id;
我有一個取消按鈕,如果我點擊的是哪個用戶完成付款將恢復返回客戶帳戶