Yep, I appreciate that’s the normal process but in this instance I have a booking form which asks for lots of information and it includes the deposit payment but that payment can be a non-Stripe payment hence my problem.
I still think it should be possible to add the option within the Wappler Stripe feature to allow it to ignore the Stripe part (do a condition within the Server Connect action so it’s nice and secure) and send back some kind of code to the front-end so it processes everything nicely.
I appreciate it’s probably not helpful, but perhaps I should have mentioned in my reply, that if an alternative payment is selected, the confirmation page won’t show the Stripe payment form.
Again, I’m probably missing the point, but this can be done by setting the Capture Method to ‘manual’.
No, the SC action returns an error because it didn’t receive a successful payment submission.
This is the whole issue. I want there to be a way to send a value to the SC API which says ‘this isn’t a Stripe payment’. The API then processes all the data and returns a success response. The front-end then shows the confirmation in the normal way.
This means I can have a condition in the SC API which says ‘if payment selected is card… do the Stripe stuff’ and ‘if payment selected is bank transfer, ignore the Stripe stuff’. But the front-end needs to still get the response and show an error if the payment was attempted but failed.
At the moment it shows an error because the payment wasn’t even attempted.
I don’t really understand why a Stripe submission needs to be made at all if a bank transfer is to be made. If the bank transfer option is selected, why need the Stripe form be displayed/accessible?
Imagine a form with 20 input fields. The visitor fills in all those fields and then the 21st field is a select which asks how they will pay their deposit. They can select ‘card’ or ‘transfer’. If they select ‘card’ then the Stripe box is shown so they can enter their card details. If they select ‘transfer’ then there isn’t another input box.
The submit button then sends everything in one go.
If there’s no way of overriding the Stripe processing then I’ll have no choice but to split the form into two stages but I was trying to avoid doing that.
I think you could submit the same form, whether Stripe or bank transfer is selected. If Stripe is selected you could run the relevant SC API (to create the payment intent etc), and, onsuccess of this, you could run the API to save the form data. If bank transfer is selected, just run the second one. I wouldn’t have thought you needed to split the form into two stages.
Sorry - I couldn’t remember what I did. I used two forms - one form which is submitted if non-card payment is chosen or is called onsuccess of the Stripe form being submitted (if card payment is chosen). Only the first form would contain most the data entered by the user, so I wouldn’t have thought this approach would be a problem.