diff --git a/README.md b/README.md index 2a22637..b456352 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,8 @@ $billingParams = [ 'zip' => '11231', 'country' => 'EG', 'email' => 'example@company.com', + 'phone' => '+966000000000', + 'custref' => 'user_id_1234' // The user's unique system ID to remember his card ]; return $telrManager->pay('ORDER_ID_GOES_HERE', 'TOTAL_AMOUNT', 'DESCRIPTION ...', $billingParams)->redirect(); @@ -86,4 +88,4 @@ And on telr callback **(Success|Cancel|Declined)** to handle response put the fo ```php $telrManager = new \TelrGateway\TelrManager(); $telrManager->handleTransactionResponse($request); -``` \ No newline at end of file +``` diff --git a/src/CreateTelrRequest.php b/src/CreateTelrRequest.php index 5d665db..be9c942 100644 --- a/src/CreateTelrRequest.php +++ b/src/CreateTelrRequest.php @@ -368,6 +368,42 @@ public function getLangCode() return data_get($this->data, 'ivp_lang', null); } + /** + * @return mixed + */ + public function getBillingCustref() + { + return data_get($this->data, 'bill_custref', null); + } + + /** + * @param $custref + * @return $this + */ + public function setBillingCustref($custref) + { + $this->data['bill_custref'] = $custref; + return $this; + } + + /** + * @return mixed + */ + public function getBillingPhone() + { + return data_get($this->data, 'bill_phone', null); + } + + /** + * @param $phone + * @return $this + */ + public function setBillingPhone($phone) + { + $this->data['bill_phone'] = $phone; + + return $this; + } /** * Append order id to URL * @@ -412,6 +448,8 @@ public function toArray() 'bill_zip' => $this->getBillingZip(), 'bill_country' => $this->getBillingCountry(), 'bill_email' => $this->getBillingEmail(), + 'bill_custref' => $this->getBillingCustref(), + 'bill_phone' => $this->getBillingPhone(), ]; } }