Skip to content
This repository was archived by the owner on Mar 19, 2022. It is now read-only.

Deleting a token

Alexander Vizhanov edited this page Apr 27, 2017 · 3 revisions
// Create a gateway for the WorldPay Gateway
// (routes to GatewayFactory::create)
$gateway = Omnipay::create('\\lembdev\\WorldPay\\Gateway');

// Initialise the gateway
$gateway->initialize([
    'serviceKey' => 'MyServiceKey',
    'clientKey'  => 'MyClientKey',
]);

// Do a create card transaction on the gateway
$response = $gateway->deleteCard([
    'token' => 'CARD_TOKEN',
])->send();

if ($response->isSuccessful()) {
    echo "Gateway deleteCard was successful.\n";
} else {
    echo $response->getMessage();
}
Clone this wiki locally