Delphi (DLL) / GP-API Collection / DCC_1.2 ECOM Sale
Back to Collection Items
var
begin
CkJsonObject_UpdateString(json,'account_name','dcc');CkJsonObject_UpdateString(json,'type','SALE');CkJsonObject_UpdateString(json,'channel','CNP');CkJsonObject_UpdateString(json,'amount','10');CkJsonObject_UpdateString(json,'currency','EUR');CkJsonObject_UpdateString(json,'country','GB');CkJsonObject_UpdateString(json,'capture_mode','AUTO');CkJsonObject_UpdateString(json,'reference','TRANS-20180114123459948');CkJsonObject_UpdateString(json,'payment_method.first_name','James');CkJsonObject_UpdateString(json,'payment_method.last_name','Mason');CkJsonObject_UpdateString(json,'payment_method.entry_mode','ECOM');CkJsonObject_UpdateString(json,'payment_method.card.number','4006097467207025');CkJsonObject_UpdateString(json,'payment_method.card.expiry_month','12');CkJsonObject_UpdateString(json,'payment_method.card.expiry_year','30');CkJsonObject_UpdateString(json,'payment_method.card.cvv','996');CkJsonObject_UpdateString(json,'currency-conversion.id','{{ccs_id}}');CkHttp_putAuthToken(http,'{{token}}');
Curl Command
curl -X POST
-H "Content-Type: application/json"
-H "X-GP-Version: {{version}}"
-H "Authorization: Bearer {{token}}"
-d '{
"account_name": "dcc",
"type": "SALE",
"channel": "CNP",
"amount": "10",
"currency": "EUR",
"country": "GB",
"capture_mode": "AUTO",
"reference": "TRANS-20180114123459948",
"payment_method": {
"first_name": "James",
"last_name": "Mason",
"entry_mode": "ECOM",
"card": {
"number": "4006097467207025",
"expiry_month": "12",
"expiry_year": "30",
"cvv": "996"
}
},
"currency-conversion": {
"id": "{{ccs_id}}"
}
}'
https://{{url}}/ucp/transactions
Postman Collection Item JSON
{
"name": "DCC_1.2 ECOM Sale",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
},
{
"key": "X-GP-Version",
"value": "{{version}}",
"type": "text"
},
{
"key": "Authorization",
"value": "Bearer {{token}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"account_name\": \"dcc\",\n \"type\": \"SALE\",\n \"channel\": \"CNP\",\n \"amount\": \"10\",\n \"currency\": \"EUR\",\n \"country\": \"GB\",\n \"capture_mode\": \"AUTO\",\n \"reference\": \"TRANS-20180114123459948\",\n \"payment_method\": {\n \"first_name\": \"James\",\n \"last_name\": \"Mason\",\n \"entry_mode\": \"ECOM\",\n \"card\": {\n \"number\": \"4006097467207025\",\n \"expiry_month\": \"12\",\n \"expiry_year\": \"30\",\n \"cvv\": \"996\"\n }\n },\n \"currency-conversion\": {\n \"id\": \"{{ccs_id}}\"\n }\n}"
},
"url": {
"raw": "https://{{url}}/ucp/transactions",
"protocol": "https",
"host": [
"{{url}}"
],
"path": [
"ucp",
"transactions"
]
}
},
"response": [
]
}