Capture Authorized Payment

Do a request to Capture the Authorized Payment

Using the PHP SDK

You can also use the PHP SDK to trigger a request to Capture an Authorize Payment. This will take the money from the customer's bank account.
The payment must already be authorized and you can only capture it once.

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

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

    $model = new CartGateway\Models\CaptureAuthorizedPayment([
        'amount' => '', // in cents
        'authorized_payment_id' => '', // the unique id from the authorized payment request
    ]);
    $response = $client->captureAuthorizedPayment($model);
} catch (CartGateway\Exceptions\ApiException $e) {
  	echo $e->message;
    exit;
}

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