-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Stripe Field #1778
Add Stripe Field #1778
Conversation
More details would help about this feature, @Soare-Robert-Daniel . |
@mghenciu, you got it right. In the form, we just display the product. The payment page will be handled by Stripe. |
@Codeinwp/design-team, one thing to be aware. The plan to use Stripe's checkout session might not be feasible since Stripe recommends another type of workflow: https://stripe.com/docs/payments/finalize-payments-on-the-server |
@HardeepAsrani Regarding the usage of Stripe Checkout Session like in Stripe Checkout Block. Here is the workflow that I am thinking about (assuming that the admin will take care of failed workflows): flowchart LR
A(Form) --> B{User Click Submit}
B -->|No Stripe Field| C[Full Form Workflow]
B -->|Stripe Field Detected| DataCheck[Check the data]
subgraph save [Temp Save Workflow]
DataCheck --> FileSave[Save the input data & files as Submission]
end
FileSave --> Products
subgraph stripe [Create Stripe Session]
Products[Get the products on the form using WP Options] --> Session[Create a checkout session using Checkout API]
end
Session --> D[Redirect the user to Checkout Sessiont]
D --> E{User in Checkout Session}
E -->|Attempt Payment| F{Payment Successful}
F --> Redirect[Redirect with Submission ID]
E -->|Payment Attempt Failed| H[End with Error]
H --> Redirect
F -->|Payment Failed| H
Redirect --> RemainingAction[Run remaining actions. E.g: autoresponder, webhooks]
RemainingAction --> Result{Form final result}
Result --> |Is Error| FormError[Show an error and tell the client that the payment was done and admin will revise the issue]
Result --> |Ok| FormOK[Show Success Message]
|
@Soare-Robert-Daniel That looks good. We can stick to the Stripe Checkout Block style implementation and tackle any concerns you have about the workflow during the L10 today. |
After a discussion with Robert on Slack, and some design exploration - we got to this version >> Figma. |
Looking good gentlemen, thanks! |
Closes #.
Summary
Screenshots
Test instructions
Checklist before the final review