-
Notifications
You must be signed in to change notification settings - Fork 34
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 Form Field & Temporary Submission Saving #1798
Conversation
@Codeinwp/design-team, here is a short preview of the workflow 2023-08-03.16-40-34.mp4ℹ️ We decided to use the Stripe Checkout session. When you press submit for the first name, the data from the field are saved into the Submissions table as |
Thank you for the update Robert. To summarise, the idea behind this feature is to redirect the users to a Stripe Checkout form - but also add a new submission in the Otter Submissions list. From the previous question:
are you referring to how should this look in the backend or frontend? Also regarding the error handling and different states that at Stripe Checkout could end with, how are we managing those. For example let's say the user closes the Stripe Checkout tab, basically abandoning the flow. What would happen to the Otter form? Thank you! |
Yes,
Since we use the Stripe Checkout Session, do not need to handle errors from Stripe. Stripes give us two options: success and cancel. If it is a success, we display the success message of the form. If cancel, we display the error with unpaid purchase. Now, if you are in the stripe checkout session, close the tab. Nothing will happen to the user regarding the Form -- the same behavior can be seen in Stripe Checkout Block. But since we save the submission, the submission will remain in the database as The Form will react only when it is open in a URL that has the param |
Bundle Size Diff
|
Plugin build for 22edc4f is ready 🛎️!
|
E2E SummaryTyping
Values above 60ms"3 - 61.06, 10 - 62.35, 12 - 62.89, 15 - 60.84" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left few nits here and there but overall looks good. We need to do a through QA here to confirm the new and the existing features work as before with and without the Pro being installed.
@Soare-Robert-Daniel After adding 2 Stripe fields on an existing form (from Web agency starter site), i got a fatal error when i opened the page in frontend
|
@irinelenache, I updated your instance. |
You can check here:
|
The problem regarding the cron should be solved now 🔧 -- the name of the event was not the same as the one of the hook, thus the multiple spawn. Regarding the redirect option for the Form, it doesn't work automatically in the confirmation process. The redirect does not happen if the event is not user-related ( It does not press any button).
|
@Soare-Robert-Daniel Tested the latest changes and everything is fine now 👍 |
ℹ️ Now, redirect behavior will be switching the link in the same tab rather than opening a new one. |
@Soare-Robert-Daniel Had another look regarding the issue discussed on Slack and it's fixed now, i'll move this to Ready to merge ✅ |
.fleet/settings.json
Outdated
@@ -0,0 +1,3 @@ | |||
{ | |||
"toolchains": [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. And better put it to .gitignore
since it is IDE-related.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make the changes? Delete it and put it in gitignore?
🎉 This PR is included in version 2.4.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Closes #.
Summary
This combines the PRs #1778 and #1769
Screenshots
Test instructions
The flow of the Stripe Field
Draft
-- more about this behavior: Add temporary saving for form submissions #1769.stripe_checkout
. That is the ID of the session, and it will be used to determine if a user has paid or not.Draft
ℹ️ If you enable webhook and autoresponder, while in the paying stage, those should not trigger. They must trigger ONLY if the payment is
paid
(you check this in Stripe Dashboard marked as Complete).ℹ️ If the payment is marked as done, but you did not visit the special URL. We have a corn job that runs every hour (this value is still in discussion) and checks if there are Submissions in
Draft
mode but with complete payment. If it detects such cases, it will trigger the confirmation process and the remaining functions (webhooks, autoresponder).You must test if:
Checklist before the final review