#JackWinstanleyBespoke
1 messages · Page 1 of 1 (latest)
Hi 👋 I'm not sure off-hand but think it might be if all necessary details are provided, are you encountering an error when you try to do so?
Just get the following error:
Failed processing stripe payment
This only happens when including automatic tax
Can you share the ID of the request that returned that error?
I don't think the request is actually registering. The error is from the PHP Api
What is your code trying to do?
Create line item data
$line_items[] = [ 'price_data' => [ # Mutliple by 100 to convert into pence 'unit_amount' => ($Ticket->total * 100), 'currency' => config('payments.stripe.currency'), 'tax_behavior' => 'exclusive', 'product_data' => [ 'name' => "Ticket(s) for Red Rose Awards Event" ], ], 'quantity' => '1', ]; try { # Return the stripe checkout session return \Stripe\Checkout\Session::create([ 'line_items'=> $line_items, ** 'automatic_tax' => [ 'enabled' => true, ],** 'mode' => 'payment', 'invoice_creation' => [ 'enabled' => true, 'invoice_data' => [ 'description' => 'Red Rose Awards', ], ], 'success_url' => $Redirect, 'cancel_url' => $Cancel, 'customer_email' => $Ticket->email, ]);
Sincere apologies for the delay. That code doesn't look like it would process a payment, so I'm not sure why it would be returning the error you described. Can you clarify where you were seeing that error returned?