Void Payment

Do a Void Payment Request

Using the PHP SDK

You can also use the PHP SDK to trigger a request to Void a Charged or Captured Payment (full amount will be voided).

<?php

require '../vendor/autoload.php';

try {
    $client = new CartGateway\CartGateway([
        'account_id' => 123,
        'access_token' => 'access-token',
    ]);

    $model = new CartGateway\Models\VoidPayment([
        'payment_id' => '',
    ]);
    $response = $client->voidPayment($model);
} catch (CartGateway\Exceptions\ApiException $e) {
    echo $e->message;
    exit;
}

// void was a success
var_dump($response);
Language
Credentials
Header
Click Try It! to start a request and see the response here!