![]() ![]() Then you can reconcile your order's quantities with the final line item quantity purchased. list_line_items ( checkout_session, " load your internal order from the database here. Line_items = Stripe : : Checkout : : Session. # Invalid signature return status 400 end if event = ''Ĭheckout_session = event # Invalid payload return status 400 rescue Stripe : : SignatureVerificationError = > e construct_event ( payload, sig_header, endpoint_secret ) rescue JSON : : ParserError = > e ![]() "sk_test_4eC39HqLyjWDarjtT1zdp7dc" require 'sinatra' # You can find your endpoint's secret in your webhook settingsĮvent = nil # Verify webhook signature and extract the event # See for more information. If you use adjustable quantities, change your configuration so that it uses adjustable_quantity.maximum when creating the Checkout Session to reserve inventory quantity instead of the line_items quantity.Ĭheckout prevents the customer from removing an item if it is the only item remaining. When using adjustable quantities with a line_items.quantity value greater than 99 (the default adjustable maximum), set adjustable_quantity.maximum to be greater than or equal to that item’s quantity. You can specify a value of up to 999999 for adjustable_quantity.maximum. By default, an item’s minimum adjustable quantity is 0 and the maximum adjustable quantity is 99. You can customize the default settings for the minimum and maximum quantities allowed by setting adjustable_quantity.minimum and adjustable_quantity.maximum. Set adjustable_quantity on your line_items when creating a Checkout Session to enable your customers to update the quantity of an item during checkout. Create a Checkout Session with adjustable_quantity enabled ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |