Mohit Posted October 5, 2023 Share Posted October 5, 2023 Hi Team I am using FormBuilder with Stripe. I wanted to save my form entries in the DB and also want to fire a mail with the form data. The issue is when the payment is successful the number of entries are incremented by 1(currently there are 49 and they keep incrementing if payment is successful) but when I click on entries it shows No entries to display like in below image. I have enabled the option to save entries to database and send email to administrator. Administrator email is also added as well. No email is firing as well. I have used this hook as well but still no luck $wire->addHookAfter('FormBuilderProcessorStripe::chargeSuccess', function($e) { $entry = $e->arguments(0); // array of data for submitted form entry $email = 'xxx@gmail.com'; // you had a field named 'email' with email addr $secretCode = '123abcdef'; wireMail() ->to($email) ->subject("Your order") ->body("Thank you for your order, your secret code is: $secretCode") ->send(); }); Any suggestions on both the issues? Link to comment Share on other sites More sharing options...
elabx Posted October 5, 2023 Share Posted October 5, 2023 Could you debug if the webhooks are correctly setup and working?? It's the first thing I'd think of, if i remember correctly, the entries will only show on successful payment. Link to comment Share on other sites More sharing options...
Mohit Posted October 6, 2023 Author Share Posted October 6, 2023 Thanks Mate! It worked. Actually I had htpassword ON so it was not saving information after stripe success neither was sending mail. I removed that and it worked for both mail and entries. Still not sure what's the logic behind that. Would be great to know that also. Link to comment Share on other sites More sharing options...
elabx Posted October 6, 2023 Share Posted October 6, 2023 9 hours ago, Mohit said: Actually I had htpassword ON so it was not saving information after stripe success neither was sending mail. Aha! gotcha! 9 hours ago, Mohit said: Still not sure what's the logic behind that. Would be great to know that also. Do you mean the Stripe webhooks part or how FormBuilder handles the process? Link to comment Share on other sites More sharing options...
Mohit Posted October 9, 2023 Author Share Posted October 9, 2023 I mean how the stripe webhook is handled after success payment for mail and saving data in backend. I have one more form which does not have stripe. It is just a contact form. It saves all the information and send mail as well on my htpassword as well. What difference does my htpassword make for stripe form and normal form? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now