progressivetech / net.ourpowerbase.remoteform

Remoteform allows you to easily create CiviCRM forms on a remote web site using a few lines of javascript code.
Other
13 stars 8 forks source link

CORS issue using Stripe #53

Open lcdservices opened 1 month ago

lcdservices commented 1 month ago

Not sure if this is an extension-related issue, but posting here in case others have run into/solved it.

We have Civi + remote form installed on a WP origin site. We have a contrib page setup that uses Stripe and are seeking to embed it on a remote WP site. We have adjusted the CORS policy on the origin site, in addition to the remote form URL settings. The form loads, but on submission we get CORS: Missing Allow Origin errors referencing https://checkout.stripe.com (403 error).

Anyone run into this? It's not clear to me if the problem is on the remote site or the origin site.

jmcclelland commented 1 month ago

Oh - That's interesting. When you create a Stripe Payment processor, you can choose either a regular Stripe payment processor, or Stripe Checkout. With Stripe Checkout, the user is redirected to a Stripe hosted page to complete the payment instead of everything happening with your site.

I'm guessing that the contribution page you are using with RemoteForm is configured to use a Stripe Checkout payment processor, not a regular Stripe one.

I've never tested RemoteForm with stripe checkout - I am pretty sure it won't work.

lcdservices commented 1 month ago

You're correct -- we were using Stripe Checkout. I didn't realize it wasn't compatible. We'll try it with the other option.