diff --git a/src/Message/RapidDirectPurchaseRequest.php b/src/Message/RapidDirectPurchaseRequest.php index ed8003d..d0af297 100644 --- a/src/Message/RapidDirectPurchaseRequest.php +++ b/src/Message/RapidDirectPurchaseRequest.php @@ -93,6 +93,12 @@ public function getData() $data['Method'] = 'ProcessPayment'; } + if (isset($data['Customer']['TokenCustomerID'])) { + // If we are paying using token, remove the card details + // otherwise the displayed data will be overwritten on eWay dashboard + unset($data['Customer']['CardDetails']); + } + return $data; }