1

I am trying to implement SquareUp Payment Gateway on a website and using Square Connect V2. When I try to show SqPaymentForm form in JavaScript but getting the following error -

paymentform:1 Uncaught Error: SqPaymentForm can only be embedded on sites that use HTTPS.

I can see a function named setSSLVerification in sample code but it not working and also I can't find it in API. I wonder if there is any way to turn SSL verification.

Can we turn off SSL verification? Like for development server?

Update: After trying couple of unsuccessful things, I finally purchased SSL for dev server. As that's the easiest and quick solution. Thanks everyone for your answers.

NKJ
  • 41
  • 6

2 Answers2

1

You can use localhost for testing payment forms, but you are not able to use other development environments (like external testing servers). I'd recommend either testing from your local machine, or getting a free certificate with a service like Let's Encrypt

tristansokol
  • 4,054
  • 2
  • 17
  • 32
  • Not really related to this anymore though if you post a thing twice from multiple accounts you can either leave it be or do a custom flag; No need to vandalize it in an edit :P – LW001 Oct 31 '17 at 18:24
  • Yeah I couldn't figure out how to delete the post from the temp account and then I deleted the temp account and lost hope. Thanks for the tip! – tristansokol Oct 31 '17 at 19:19
0

just use following code.

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

in your c# code for bypass the security of HTTPS.