#geimsdin

1 messages · Page 1 of 1 (latest)

spiral swanBOT
slate shard
plain holly
#

Thanks, that is useful

slate shard
#

No problem! Happy to help 😄

plain holly
#

If "complete" is true it means it is ready to be submitted? Seems the only data I should care about, is that correct?

slate shard
#

Yup, complete=true means the required data has been collected

plain holly
#

Can I submit the form by the payment element? Somthing like paymentElement.submit... ?

slate shard
#

Stripe doesn't provide payment button, so you'll need to use your own button to submit and call stripe.confirmPayment method

plain holly
#

I do that but I have some issues

#

I try to explain: I have to wrap the iframe in a form and then submit that form

#

It is tricky to access the iframe DOM to place a button inside the payment form

#

What would you suggest me to do in this case?

#

How to target the payment form and submit it in js?

slate shard
#

where did you place the payment element then? is it in the iframe or in the form?

plain holly
#

The payment element is in a form attached to the document, stripe then loads inside it his iframe

#

Stripe iframe contains another document with the real payment form

slate shard
#

i don't quite understand your issue

plain holly
#

Let me try to be more specific

#

I'm creating an integration on woocommerce, woocommerce first submits the order through ajax to check for fields validation and gives me back an event of "checkout success" or "checkout failure", in case of success I check if the payment data is "complete" and if true then I need to submit only the payment form, after the payment form is processed I know if it is succesful and I can proceed validating the order.

#

If I trigger the submit of the form containing the Stripe Iframe then I trigger also the woocommerce form.

#

I think I need to submit only the payment form in the iframe

slate shard
plain holly
#

Then I have to move the payment in a modal outside the checkout form

#

in any case if I cannot submit the payment form in js I need to wrap it in another form

slate shard
#

You probably can try it out to test if it works

plain holly
teal sedge
#

Hi @plain holly I'm taking over this thread

plain holly
#

Hi Jack

teal sedge
#

What's your most recent question?

plain holly
teal sedge
#

Hmm, OK, so what the question?

plain holly
#

I have to clear my mind, don't want to waste your time now, I will try some DOM manipulation and if it fails I will write again.

teal sedge
#

Sure, no problem