Created
January 11, 2018 11:45
-
-
Save joeyemery/00eacc1dc768df860dc63cef4793b5b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
$charge = \Stripe\Charge::create(array( | |
"amount" => $message->price * 100, | |
"currency" => "gbp", | |
// "source" => $connected_customer->id, | |
"source" => $token->id, | |
), array("stripe_account" => $message->user->stripe_merchant_id)); | |
} catch (\Stripe\Error\RateLimit $e) { | |
return []; | |
} catch (\Stripe\Error\InvalidRequest $e) { | |
return []; | |
} catch (\Stripe\Error\Authentication $e) { | |
return []; | |
} catch (\Stripe\Error\ApiConnection $e) { | |
return []; | |
} catch (\Stripe\Error\Base $e) { | |
return []; | |
} catch (Exception $e) { | |
return []; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment