Hi,
I’m really close to getting a successful HTTPS POST with the HL7800.
At the final step, I’m getting a NO CARRIER / KHTTP_ERROR: 1,6, which I understand means HTTP connection timeout. I suspect this is due to the way I construct the KHTTPPOST being wrong.
The full uri I’m posting to is https://api.sandbox.ewaypayments.com/DirectPayment.json.
Can you confirm how the post should be constructed?
I was thinking AT+KHTTPPOST=1,"/DirectPayment.json",1 however that doesn’t work for some reason.
Here’s the full AT output, thanks for your continued support, it’s been great so far!
AT
OK
ATI3
BHL7800.3.4.1.0.20190425
OK
AT+CMEE=1
OK
AT+CPIN?
+CPIN: READY
OK
AT+CGATT=0
OK
+KCNX_IND: 1,0,0
AT+CREG?
+CREG: 0,0
OK
AT+CEREG?
+CEREG: 0,0
OK
AT&K3
OK
AT+KPATTERN="--EOF--Pattern--"
OK
AT+KCERTDELETE=0,0
OK
AT+KCERTDELETE=1,0
OK
AT+KCERTDELETE=1,1
OK
AT+KCERTDELETE=1,2
OK
AT+KPRIVKDELETE=0
OK
AT+KPRIVKDELETE=1
OK
AT+KPRIVKDELETE=2
OK
AT+KSSLCFG=0,3
OK
AT+KSSLCFG?
+KSSLCFG: 0,3
+KSSLCFG: 2,0
OK
AT+KCERTSTORE=0
CONNECT
-----BEGIN CERTIFICATE-----
MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBh
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH
MjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAwMDBaMGExCzAJBgNVBAYTAlVT
MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j
b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkqhkiG
9w0BAQ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CERTIFICATE-----
local_cert,0,0
local_cert,1,0
local_cert,2,0
OK
AT+CCLK?
+CCLK: "19/12/05,17:27:26+44"
OK
AT+KCNXCFG=1,"GPRS","telstra.wap","",""
OK
AT+KCNXPROFILE=1
OK
AT+KSSLCRYPTO=0,9,3,25456,12,4,1
OK
AT+KCNXUP=1
OK
+KCNX_IND: 1,4,1
+KCNX_IND: 1,1,0
AT+KHTTPCFG=1,"api.sandbox.ewaypayments.com",443,2,,,,,0
+KHTTPCFG: 3
OK
+KHTTP_IND: 3,1
AT+KHTTPHEADER=1
CONNECT
Host: api.sandbox.ewaypayments.com
Accept: */*
Accept-Encoding: gzip, deflate
Content-Type: application/json
Content-Length: 214
Connection: keep-alive
Authorization: Basic NjBDRjNDZTk3blJTMVoxV3A1bTlrTW16SEhFaDhSa3VqMzFRQ3RWeGpQV0dZQTlGeW15cXNLMEVubTFQNm1ISmYwVEhiUjpBUEktUDRzcw==
--EOF--Pattern--
OK
AT+KHTTPPOST=1,,"api.sandbox.ewaypayments.com/DirectPayment.json",1
CONNECT
{"Customer":{"CardDetails":{"Name":"ROADLEY/TIM J.MR","Number":"4557025682354333","ExpiryMonth":"10","ExpiryYear":"20","CVN":null}},"Payment":{"TotalAmount":1000},"Method":"ProcessPayment","TransactionType":"MOTO"}
+++
NO CARRIER+KHTTP_IND: 1,1+KHTTP_ERROR: 1,6
+KHTTP_IND: 3,0