zeamster examples react node

Example 1: zeamster examples react node

{
    "transaction": {
        "action": "authonly",
        "payment_method": "cc",
        "cvv": "999",
        "exp_date": "0525",
        "transaction_amount": "3935.784",
        "location_id": "11e642cdbf2b816ea0491742",
        "contact_id": "11e642d0c941b5949679c85e"
    }
}

Example 2: zeamster examples react node

$curl = curl_init();
$url = 'https://test.url/v2/transactions';
curl_setopt_array($curl, array(
    CURLOPT_URL => $url,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => "{\n
    \"transaction\": {\n
            \"transaction_amount\": \"10\",\n
            \"location_id\": \"1111111111\",\n
            \"action\": \"sale\"\n
       }\n}",
    CURLOPT_HTTPHEADER => array(
        "content-type: application/json",
        "developer-id: dev-1234",
        "user-api-key: 2222222222222222",
        "user-id: 111111111111111"
    ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
    echo "cURL Error #:" . $err;
} else {
    echo $response;
}

Tags:

Misc Example