Received unknown parameter: amount_decimal
Why stripe payment decimal amount getting an error
my code
Stripe\Stripe::setApiKey(env('STRIPE_SECRET'));
Stripe\Charge::create ([
"amount_decimal" => $this->request->finalAmount,
"currency" => "GBP",
"source" => $this->request->token,
"description" => "Test payment."
]);
@sabbir345 amount_decimal parameter is not supported when creating a charge. Use amount instead:
Stripe\Charge::create([
"amount" => intval($this->request->finalAmount * 100), // multiply by 100 if finalAmount is not in cents
"currency" => "GBP",
"source" => $this->request->token,
"description" => "Test payment."
]);
https://stripe.com/docs/api/charges/create
@sti3bas
My amount as like 65.50 , 150.80
Please or to participate in this conversation.