#jpmishra1010
1 messages · Page 1 of 1 (latest)
Hi there, it means the payment requires customer's action in order to proceed (usually due to 3DS)
You should just call stripe.confirmPayment() again to start the 3DS flow https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent
After doing this, we are getting this response.
Let me share you the details
$amount=2;
\Stripe\Stripe::setApiKey(env('STRIPE_SECRET'));
$stripe = new \Stripe\StripeClient(env('STRIPE_SECRET'));
$customer = $stripe->customers->create([
'email' => session()->get('user.email'),
'name' => session()->get('user.username'),
"source"=>$request->stripeToken,
]);
$output= \Stripe\PaymentIntent::create ([
'payment_method_types'=>['card'],
"amount" => $amount * 100,
// $coupon=Package::find($pac[]);
$package=Package::find($ex);
$amount=$package->international_price;
$amount=2;
\Stripe\Stripe::setApiKey(env('STRIPE_SECRET'));
$stripe = new \Stripe\StripeClient(env('STRIPE_SECRET'));
$customer = $stripe->customers->create([
'email' => session()->get('user.email'),
'name' => session()->get('user.username'),
"source"=>$request->stripeToken,
]);
$output= \Stripe\PaymentIntent::create ([
'payment_method_types'=>['card'],
"amount" => $amount * 100,
"currency" => "inr",
'customer'=>$customer->id,
"description" => "Test payment " ,
'payment_method' => "$card_id",
]);
$output2= $stripe->paymentIntents->confirm(
$output->id
);
if($output2->status!='succeeded'){
return $output2->status;
}
Please check this
Just share with me the paymentIntent ID
pi_3Lp3TgSAx1WgSsNQ0Ff7FHmC
OK, so the paymentIntent status becomes requires_action after you confirm it from backend. So you need to confirm it from frontend (via stripe.confirmPayment()) to launch the 3DS flow for your customer to authenticate the payment.
So I use 2DS it won't work?
I don't know what you mean by 2DS.
Ok I am trying with 3DS, if needed help. Will respond again here.
Thank you for your quick response.