adrianmacneil/omnipay — pull request #161 by TheBishopOfSoho (2013-11-06 10:07:06+00:00)
Title: Addition of Token SUpport for SagePay Direct

I have included support for createToken and deleteToken for SagePay, using similar methods to other Gateways.
There is also a getToken method for the response when createToken is used.

Storing a token works as below (assumes test mode has been enabled):

```php

$cardOptions = array(
'firstName' => 'Shane',
'lastName' => 'O\'Connor',
'number' => 5404000000000001,
'ExpiryMonth' => 11,
'ExpiryYear' => 14,
'cvv' =>123,
'type' => 'MC',
);

$card = new CreditCard($cardOptions);

$request = $gateway->createCard(array('Currency' => 'GBP','card' => $card));
$response = $request->send();

if($response->getToken()){
$token = $response->getToken();
}

```

To remove a token, use the deleteToken method, where the only option to pass in is the cardReference.