Jump to content

Stripe payment action for FormBuilder not working fine


Mohit
 Share

Recommended Posts

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.
image.png.c0b9b6de04476dd5f40f17c734a80358.png
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

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...