Advertisement
wurtz

Create Payment Intent

May 14th, 2021
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. public function setStripeInfo()
  2. {
  3. // payment intent
  4. $secret_key = config('services.stripe.sk');
  5. Stripe::setApiKey($secret_key);
  6. $paymentIntent = PaymentIntent::create([
  7. 'amount' => 50,
  8. 'currency' => 'usd',
  9. 'payment_method_types' => ['card_present'],
  10. 'capture_method' => 'manual',
  11. 'on_behalf_of' => $this->stripe_act,
  12. 'transfer_data' => [
  13. 'destination' => $this->stripe_act,
  14. ]
  15. ]);
  16. $this->paymentIntentId = $paymentIntent->id;
  17. $this->clientSecret = $paymentIntent->client_secret;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement