diff --git a/src/RapidDirectGateway.php b/src/RapidDirectGateway.php index 28cfce7..4e11ffd 100644 --- a/src/RapidDirectGateway.php +++ b/src/RapidDirectGateway.php @@ -135,6 +135,10 @@ public function setPassword($value) */ public function purchase(array $parameters = []) { + if (isset($parameters['card']['number']) && substr($parameters['card']['number'], 0, 9) === 'eCrypted:') + { + $parameters['encryptedCardNumber'] = $parameters['card']['number']; + } return $this->createRequest('\Omnipay\Eway\Message\RapidDirectPurchaseRequest', $parameters); } @@ -152,6 +156,10 @@ public function purchase(array $parameters = []) */ public function authorize(array $parameters = []) { + if (isset($parameters['card']['number']) && substr($parameters['card']['number'], 0, 9) === 'eCrypted:') + { + $parameters['encryptedCardNumber'] = $parameters['card']['number']; + } return $this->createRequest('\Omnipay\Eway\Message\RapidDirectAuthorizeRequest', $parameters); }