Skip to content

Commit

Permalink
Merge pull request #13 from silviusomesan/master
Browse files Browse the repository at this point in the history
identityCardType as new ALU request parameter to support new UPT payment method
  • Loading branch information
drealecs committed Apr 3, 2016
2 parents f17d54f + 1957261 commit 944b7f6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/PayU/Alu/Billing.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ class Billing extends AbstractCommonAddress
*/
private $identityCardIssuer;

/**
* @var string
*/
private $identityCardType;

/**
* @var string
*/
Expand Down Expand Up @@ -118,6 +123,16 @@ public function withIdentityCardSeries($identityCardSeries)
return $this;
}

/**
* @param string $identityCardType
* @return $this
*/
public function withIdentityCardType($identityCardType)
{
$this->identityCardType = $identityCardType;
return $this;
}

/**
* @param string $personalNumericCode
* @return $this
Expand Down Expand Up @@ -184,6 +199,14 @@ public function getIdentityCardSeries()
return $this->identityCardSeries;
}

/**
* @return string
*/
public function getIdentityCardType()
{
return $this->identityCardType;
}

/**
* @return string
*/
Expand Down
1 change: 1 addition & 0 deletions src/PayU/Alu/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ private function transformObject2Array()
$this->internalArray['BILL_CISERIAL'] = $this->billingData->getIdentityCardSeries();
$this->internalArray['BILL_CINUMBER'] = $this->billingData->getIdentityCardNumber();
$this->internalArray['BILL_CIISSUER'] = $this->billingData->getIdentityCardIssuer();
$this->internalArray['BILL_CITYPE'] = $this->billingData->getIdentityCardType();
$this->internalArray['BILL_CNP'] = $this->billingData->getPersonalNumericCode();
$this->internalArray['BILL_COMPANY'] = $this->billingData->getCompany();
$this->internalArray['BILL_FISCALCODE'] = $this->billingData->getCompanyFiscalCode();
Expand Down
1 change: 1 addition & 0 deletions tests/PayU/Alu/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ public function testGetParams()
'BILL_CIISSUER' => NULL,
'BILL_CINUMBER' => '324322',
'BILL_CISERIAL' => NULL,
'BILL_CITYPE' => NULL,
'BILL_CITY' => 'Bucuresti',
'BILL_CNP' => NULL,
'BILL_COMPANY' => NULL,
Expand Down

0 comments on commit 944b7f6

Please sign in to comment.