Laravel Stripe API Error: Unable to accept payments in India due to lack of support
P粉399090746
P粉399090746 2023-08-08 12:17:35
0
1
632
<p>I am creating an e-commerce website and want to provide payment gateway through Stripe but I am getting error: "You cannot accept payments using this API as it is no longer supported in India. Please refer to https://stripe. com/docs/payments to learn more about accepting payments." Here, I'm using Laravel as the backend. <br /><br />My controller code is: </p><p><strong></strong></p> <pre class="brush:php;toolbar:false;">public function stripePost(Request $request) { StripeStripe::setApiKey(env('STRIPE_SECRET')); StripeCharge::create ([ "amount" => 100 * 100, "currency" => "inr", "source" => $request->stripeToken, "description" => "Thankyou " ]); Session::flash('success', 'Payment successful!'); return back(); }</pre> <p>I tried changing it</p> <pre class="brush:php;toolbar:false;">public function stripePost(Request $request) { StripeStripe::setApiKey(env('STRIPE_SECRET')); Stripe::PaymentIntent.create([ "amount" => 100 * 100, "currency" => "inr", "source" => $request->stripeToken, "description" => "Thankyou " ]); Session::flash('success', 'Payment successful!'); return back(); }</pre> <p>But still error</p>
P粉399090746
P粉399090746

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template