#ashadchempakath
1 messages · Page 1 of 1 (latest)
"source" => $request->stripeToken is this it?
@reef vortex if you get that error then $request-stripeToken is null
but anyway, you shouldn't even be doing this, that's a legacy way of using Stripe that's been deprecated since 2019. What guide are you using? https://stripe.com/docs/payments/accept-a-payment is the correct one.
I tested it in local $request-stripeToken is not null, but in server side its null
Stripe::setApiKey(env('STRIPE_SECRET'));
Charge::create ([
"amount" => (int)($request->price * 100),
"currency" => "aed",
"source" => $request->stripeToken,
"description" => "This payment is tested purpose phpcodingstuff.com"
]);
then you'd have to debug why it's null
I'd suggest adding some logging! like I said though, this code is all completely legacy and you shouldn't even be writing it, you should use our current integrations of Checkout or PaymentIntents.
can you send me the link