From 4d4226be0afecc79b6a8605392559fd3e085b5d5 Mon Sep 17 00:00:00 2001 From: Ivan Toth Date: Tue, 12 Sep 2017 17:23:41 +0200 Subject: [PATCH] added customer name to CardTokenRequest --- src/Message/AbstractRequest.php | 10 ++++++++++ src/Message/CardTokenPurchaseRequest.php | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Message/AbstractRequest.php b/src/Message/AbstractRequest.php index f98d15f..e1a6d22 100644 --- a/src/Message/AbstractRequest.php +++ b/src/Message/AbstractRequest.php @@ -97,6 +97,16 @@ public function getEmail() return $this->getParameter('email'); } + public function setCustomerName($value) + { + return $this->setParameter('customerName', $value); + } + + public function getCustomerName() + { + return $this->getParameter('customerName'); + } + public function sendRequest($data) { // don't throw exceptions for 4xx errors diff --git a/src/Message/CardTokenPurchaseRequest.php b/src/Message/CardTokenPurchaseRequest.php index 9afe2af..23123b4 100644 --- a/src/Message/CardTokenPurchaseRequest.php +++ b/src/Message/CardTokenPurchaseRequest.php @@ -23,7 +23,7 @@ public function getData() $data['metadata'] = $this->getMetadata(); $data['cardToken'] = $this->getCardToken(); $data['email'] = $this->getEmail(); - + $data['customerName'] = $this->getCustomerName(); if ($udf = $this->getUdfValues()) { $data['udf1'] = $udf[0];