Adjustable Quantity Checkout Cashier Stripe
How can I do this? Ability to pass "adjustable_quantity" option: https://stripe.com/docs/payments/checkout/adjustable-quantity
error:
Received unknown parameter: adjustable_quantity
use Illuminate\Http\Request;
Route::get('/product-checkout', function (Request $request) {
return $request->user()->checkout(['price_tshirt' => 1], [
'success_url' => route('your-success-route'),
'cancel_url' => route('your-cancel-route'),
'adjustable_quantity' => true
]);
});
Any tips?
If you check the example code for php, they nest it
'line_items' => [[
'price' => '{{PRICE_ID}}',
'adjustable_quantity' => [
'enabled' => true,
'minimum' => 1,
'maximum' => 10,
],
'quantity' => 1,
]],
@Sinnbeck thanks!
return auth()->user()->checkout(['price_tshirt'], [
'success_url' => route('your-success-route'),
'cancel_url' => route('your-cancel-route'),
'line_items' => [[
'price' => 'price_tshirt',
'adjustable_quantity' => [
'enabled' => true,
'minimum' => 1,
'maximum' => 10,
],
'quantity' => 1,
]],
]);
Please or to participate in this conversation.