I know this has been asked in other places, but my implementation is using MSXML2.XMLHTTP.6.0. I am successfully getting the response which includes the “checkout_page_url” but when I insert the url into a web form (tried with both POST and GET), I get 404 - page not found. I have double-checked to make sure I’m getting the whole url. The only unusual feature I notice is that there is “\u0026” in front of “I=” where I am used to seeing “&”. Here is what I am getting: https://connect.squareup.com/v2/checkout?c=CXXXXXXXXXXXXXl5_6w\u0026l=78XXXXXXXXXXXXXY6
Can anyone please help?
That is odd. It sounds like there is some malformation of the URL from the web form. Looking at your logs all the responses have &
so I’m not sure where the \u0026
is coming from? When you build your web form is it adding the \u0026
?
It is in the response json. Should I manually change the “\u0026” to “&” ?
I’m not seeing in your API Logs. Do you have an example checkout order_id
that you’re seeing this with?
I am using my client’s account (using OAuth) information and location . The order ID is: 782QMGWC5RTY6
Okay, sounds good. The ID that you provided is a location_id
not the order_id
. Do you have the a response from the call to CreateCheckout
?
Sorry, here it is:
“checkout”:{“id”:“CBASELufrV2ptuF7Y1bX-1Uy2cg”…
Tried to give you the whole response, but it gets flagged by the community.
Looking at the logs for the checkout the response has the right format with the &
not the \u0026
. So there must be some malformation when it’s being converted to your form.
Can you give me the actual checkout_page_url in the response so I can compare?
Sure here is the link: https://connect.squareup.com/v2/checkout?c=CBASELufrV2ptuF7Y1bX-1Uy2cg&l=782QMGWC5RTY6
My text lines up exactly with yours. I’ll try another tact. Here is what I present after the information is sent and received from checkout:
form name=“card” method=“get” action=“https://connect.squareup.com/v2/checkout?
c=CBASEDQO-ndYdZZbwkOXo_okuLY&l=782QMGWC5RTY6”
This form returns a 404 error. Any thoughts?
I’m not sure cause when I take the URL and just paste it into a browser it works as expected.
Solution: You can’t put the entire url into the “action” part of the form. It has to be broken into pieces and place inside the form. Example below (brackets removed):
action=“https://connect.squareup.com/v2/checkout”
input type=“hidden” name=“c” value=“CBASEDQO-ndYdZZbwkOXo_okuLY”
input type=“hidden” name=“l” value=“782QMGWC5RTY6”
Thanks for your patience.
Glad to here you figured it out.