I added "stripe/stripe-php": "^7.2" to my Laravel 5.8 app and looking how stripe works https://stripe.com/docs/legacy-checkout/php I see example with sum :
$charge = \Stripe\Charge::create([
'customer' => $customer->id,
'amount' => 5000,
'currency' => 'usd',
]);
but above code in control action is triggered in callback redirect stripe method. That is different control when I calculated total sum(several product on different sun can be selected ) and show view with “Pay with Card” button. Question is how to send $5000 to this control action ? I suppose I can remember $5000 in sessions and read it callback control action, but is it good way?
Also are some other fields like description, items list which can be sent to stripe request?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire