x

SqPaymentForm doesn't load any input fields, only the labels, what am I missing?

SqPaymentForm doesn't load any input fields, only the labels, what am I missing? I copied the sample form code to a new page.

Etiquetas (1)
7,797 Vistas
Mensaje 1 de 10
Denunciar contenido inapropiado
Respuestas
Alumno

Did you forget the

<script type="text/javascript" src="https://js.squareup.com/v2/paymentform"></script>
7,765 Vistas
Mensaje 2 de 10
Denunciar contenido inapropiado

Nope, its at the top of the page, I copied the sample in its entirety.  Also I get no errors.

7,762 Vistas
Mensaje 3 de 10
Denunciar contenido inapropiado
Alumno

Hmm, that does'nt seem right!

 

Can you share a screenshot?

7,750 Vistas
Mensaje 4 de 10
Denunciar contenido inapropiado

Can't figure out what is missing, here is a screen shot of the code my page generates and the top of the code in the background. This is the URL of where I got the sampe: https://docs.connect.squareup.com/articles/adding-payment-form/square.JPG

7,747 Vistas
Mensaje 5 de 10
Denunciar contenido inapropiado
Alumno

If you open up you javascript console, you should see this error: 

Screen Shot 2016-12-12 at 2.26.14 PM.png

 

You need to serve your pages from https for security reasons, but you can test on localhost for development. 

7,732 Vistas
Mensaje 6 de 10
Denunciar contenido inapropiado

so am i to understand the page will not run if not https?

 

7,728 Vistas
Mensaje 7 de 10
Denunciar contenido inapropiado
Alumno

Yep! Like it says here: https://docs.connect.squareup.com/articles/adding-payment-form/ 

 

https is really important to make sure that people can't snoop on what you (or your customers!) are doing online. This is especially important to us when people are entering thier credit card information. 

7,723 Vistas
Mensaje 8 de 10
Denunciar contenido inapropiado

thanks so much, i got it working by activating a shared ssl that lets me use https.  One other question, I notice the payment form has no place to put in the amount?

7,721 Vistas
Mensaje 9 de 10
Denunciar contenido inapropiado
Alumno

Correct, The amount is set when call the charge endpoint (https://docs.connect.squareup.com/api/connect/v2/#endpoint-charge). Though you probably want to put display it on the screen when people enter their credit card details as well. 

7,718 Vistas
Mensaje 10 de 10
Denunciar contenido inapropiado