Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- $transaction = \Stripe\Charge::create([
- 'amount' => 100,
- 'currency' => "usd",
- 'source' => "tok_visa",
- 'capture' => false, // just preauth this amount
- ],
- ['stripe_account' => "acct_123"]);
- echo "\n";
- echo $transaction->id;
- echo "\n";
- echo $transaction->status;
- echo "\n";
- $transaction = \Stripe\Charge::retrieve($transaction->id,
- ['stripe_account' => "acct_123"]
- );
- $transaction->capture([
- 'amount' => 100,
- ], ['stripe_account' => "acct_123"]);
- echo "\n";
- echo $transaction->id;
- echo "\n";
- echo $transaction->status;
- echo "\n\;
- }
- catch(\Exception $e) {
- echo "Error: \n";
- echo $e;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement