Hi,
Having a real problem getting the api v2 working. How do I turn on debugging to see what is or is not being posted correctly within the sandbox? I am using php (process-card.php)?
I was able to turn on debug within connect:
[DEBUG] HTTP Request body ~BEGIN~
{"card_nonce":"CBASEGre99XsFfF8K81884vyzT0","amount_money":{"amount":100,"currency":"USD"},"idempotency_key":"581c1b872605a"}
~END~
* About to connect() to connect.squareup.com port 443 (#0)
* Trying 74.122.189.136... * connected
* Connected to connect.squareup.com (74.122.189.136) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate:
* subject: CN=*.squareup.com,O="Square, Inc.",L=San Francisco,ST=California,C=US
* start date: Dec 02 17:16:03 2015 GMT
* expire date: Dec 16 17:46:01 2016 GMT
* common name: *.squareup.com
* issuer: CN=Entrust Certification Authority - L1K,OU="(c) 2012 Entrust, Inc. - for authorized use only",OU=See
www.entrust.net/legal-terms,O="Entrust, Inc.",C=US
> POST /v2/locations/%7B%0A%20%20%22locations%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22id%22%3A%20%2218YC4JDH91E1H%22%2C%0A%20%20%20%20%20%20%22name%22%3A%20%22your%20location%20name%22%2C%0A%20%20%20%20%20%20%22address%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22address_line_1%22%3A%20%22123%20Main%20St%22%2C%0A%20%20%20%20%20%20%20%20%22locality%22%3A%20%22San%20Francisco%22%2C%0A%20%20%20%20%20%20%20%20%22administrative_district_level_1%22%3A%20%22CA%22%2C%0A%20%20%20%20%20%20%20%20%22postal_code%22%3A%20%2294114%22%2C%0A%20%20%20%20%20%20%20%20%22country%22%3A%20%22US%22%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22timezone%22%3A%20%22America%2FLos_Angeles%22%2C%0A%20%20%20%20%20%20%22capabilities%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%22CREDIT_CARD_PROCESSING%22%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D/transactions HTTP/1.1
User-Agent: Square-Connect-PHP/2.0.0.1
Host: connect.squareup.com
Accept: application/json
Content-Type: application/json
Authorization: Bearer sandbox-xxxxxxxxxxxxxxxxx
Content-Length: 125
< HTTP/1.1 404 Not Found
< Content-Type: application/json
< Vary: Origin, Accept-Encoding
< X-Content-Type-Options: nosniff
< X-Download-Options: noopen
< X-Frame-Options: SAMEORIGIN
< X-Permitted-Cross-Domain-Policies: none
< X-Xss-Protection: 1; mode=block
< Date: Fri, 04 Nov 2016 05:24:23 GMT
< Keep-Alive: timeout=60
< Strict-Transport-Security: max-age=631152000
< content-length: 648
<
* Connection #0 to host connect.squareup.com left intact
[DEBUG] HTTP Response body ~BEGIN~
{"errors":[{"category":"INVALID_REQUEST_ERROR","code":"NOT_FOUND","detail":"API endpoint for URL path `/v2/locations/{\n \"locations\": [\n {\n \"id\": \"18YC4JDH91E1H\",\n \"name\": \"your location name\",\n \"address\": {\n \"address_line_1\": \"123 Main St\",\n \"locality\": \"San Francisco\",\n \"administrative_district_level_1\": \"CA\",\n \"postal_code\": \"94114\",\n \"country\": \"US\"\n },\n \"timezone\": \"America/Los_Angeles\",\n \"capabilities\": [\n \"CREDIT_CARD_PROCESSING\"\n ]\n }\n ]\n}/transactions` and HTTP method `POST` is not found."}]}
~END~
* Closing connection #0
Of course I am using a bogus Location as well
Thanks,
Larry