x

ReferenceError: SqPaymentForm is not defined

Hi,

 

I made a site with using the square payment form in two different locations. Both are using Rails and both are generating the square payment in the same partial template. The first page I did works fine (a standard payment page).  The second page (save a card without being charged right now), using the same partial template does not load the input text boxes with the message "Uncaught ReferenceError: SqPaymentForm is not defined"

 

The curious thing is if I refresh the page, it loads correctly.  So there seems to be a weird Javascript conflict happening when you first come to the page, but that goes away on page refresh. Has anyone come across something like this before?

3,301 Views
Message 1 of 6
Report
5 REPLIES 5

As is tradition, after asking for help, I found the issue.

 

Turbolinks was serving the javascript from cache and messing up the order of the script loading. I turned off turbolinks and it works now.

 

Hope this helps someone in the future.

3,299 Views
Message 2 of 6
Report
Alumni

Hey @tdphillipsjr - Sorry for the delay in response here, but glad you were able to figure it out! Also, thank you for sharing your solution with the Community. I'm sure it will come in handy if other Sellers run into the same issue.

Puka - She/They
Seller Community UX Designer
3,276 Views
Message 3 of 6
Report

Can you please help me

1,209 Views
Message 4 of 6
Report

I linked the square payment system with latepoint booking plugin for receiving the payments.

 

But once it's goes to payment for the error poup SQ payment form not defined and letting to add the cards information please help me to figure it out

 

 

1,208 Views
Message 5 of 6
Report
Square Community Moderator

Hi @DumpJunkbros,

I'm not too familiar with LatePoint - Is this a plugin for a WordPress site?

It doesn't look like an integration we currently offer via the Square App Marketplace. I'd recommend reaching out to LatePoint or Wordpress directly for support with this issue. Otherwise, I suggest reaching out via the Square Developer forums to see if someone has already answered this question. 

After a brief search, I located this thread which may be a good spot to start. 

Laurie
Community Moderator, Australia, Square
Sign in and click Mark as Best Answer if my reply answers your question.
1,170 Views
Message 6 of 6
Report