Created
August 19, 2015 10:49
-
-
Save JulienTant/f9ce2516ec5342cb081c to your computer and use it in GitHub Desktop.
Blog - Soumission de formulaire de paiement
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
<?php | |
// ... | |
post('pay', function(\Illuminate\Http\Request $request, \Cartalyst\Stripe\Stripe $stripe) { | |
$charge = $stripe->charges()->create([ | |
'amount' => $request->get('amount'), | |
'currency' => 'EUR', | |
'source' => [ | |
'object' => 'card', | |
'name' => $request->get('name'), | |
'number' => $request->get('card_no'), | |
'cvc' => $request->get('cvc'), | |
'exp_month' => $request->get('expiration_month'), | |
'exp_year' => $request->get('expiration_year'), | |
] | |
]); | |
dd($charge); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment