sheena2994

Untitled

Jun 21st, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. try {
  2. $charge = Stripe::charges()->create([
  3. 'source' => $input['token'],
  4. 'currency' => 'USD',
  5. 'amount' => $amount, // amount in cents
  6. "description" => "Barter plan"
  7. ]);
  8. } catch (\Exception $e) {
  9. return Response::json(['success'=>0, 'msg'=>$e->getMessage(), 'type'=>$e->getErrorType()],$e->getCode());
  10. }
Add Comment
Please, Sign In to add comment