Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
```
```
38 changes: 38 additions & 0 deletions src/CreateTelrRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down Expand Up @@ -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(),
];
}
}