Actions on Stripe Checkout with Laravel #38021
Unanswered
usamamuneerchaudhary
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Scenario:
I'm using Stripe's new custom checkout method in my Laravel application using Laravel Cashier Package so that Stripe uses all of payments securely. All working fine. I need to pass on the additional form data along with my products, which are multiple form fields, some Ids for relationships, some images etc. Followed this page for reference guide: https://support.stripe.com/questions/using-metadata-with-checkout-sessions
But couldn't find any better approach to achieve this.
Work around
A simple work around I've managed to work with is on submitting my form, I'm creating the record and on success payment, attaching the orders and products with my listing. All good here. But if the user cancels the stripe checkout session, I'm simply deleting that record by checking if that listing exists with that user and deletes it. I'm passing query params on my custom cancel url like ?uuid=myuuid.
Question
So, as per the scenario and workaround, is there something i'm doing wrong here or any other better solution for this scenario?
Beta Was this translation helpful? Give feedback.
All reactions