@@ -17,14 +17,14 @@ |
||
| 17 | 17 | * @param RequestInterface $request |
| 18 | 18 | * @param string $data |
| 19 | 19 | */ |
| 20 | - public function __construct(RequestInterface $request, $data) |
|
| 20 | + public function __construct( RequestInterface $request, $data ) |
|
| 21 | 21 | { |
| 22 | 22 | if ( empty($data) ) { |
| 23 | 23 | throw new InvalidResponseException(); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | $this->request = $request; |
| 27 | - $this->data = $this->xmlDeserialize($data); |
|
| 27 | + $this->data = $this->xmlDeserialize( $data ); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | /** |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | $signature .= $this->getMerchantId(); |
| 27 | 27 | $signature .= $this->getAcquirerId(); |
| 28 | 28 | |
| 29 | - return base64_encode( sha1($signature, true) ); |
|
| 29 | + return base64_encode( sha1( $signature, true ) ); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /** |
@@ -36,12 +36,12 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | public function getData() |
| 38 | 38 | { |
| 39 | - $this->validate('merchantId', 'merchantPassword', 'acquirerId', 'customerReference', 'cardReference', 'card'); |
|
| 39 | + $this->validate( 'merchantId', 'merchantPassword', 'acquirerId', 'customerReference', 'cardReference', 'card' ); |
|
| 40 | 40 | $this->getCard()->validate(); |
| 41 | 41 | |
| 42 | 42 | $data = [ |
| 43 | 43 | 'CustomerReference' => $this->getCustomerReference(), |
| 44 | - 'ExpiryDate' => $this->getCard()->getExpiryDate('my'), |
|
| 44 | + 'ExpiryDate' => $this->getCard()->getExpiryDate( 'my' ), |
|
| 45 | 45 | 'MerchantNumber' => $this->getMerchantId(), |
| 46 | 46 | 'Signature' => $this->generateSignature(), |
| 47 | 47 | 'TokenPAN' => $this->getCardReference() |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | public function getCustomerReference() |
| 59 | 59 | { |
| 60 | - return $this->getParameter('customerReference'); |
|
| 60 | + return $this->getParameter( 'customerReference' ); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
@@ -65,9 +65,9 @@ discard block |
||
| 65 | 65 | * |
| 66 | 66 | * @param string $value |
| 67 | 67 | */ |
| 68 | - public function setCustomerReference($value) |
|
| 68 | + public function setCustomerReference( $value ) |
|
| 69 | 69 | { |
| 70 | - return $this->setParameter('customerReference', $value); |
|
| 70 | + return $this->setParameter( 'customerReference', $value ); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | /** |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | */ |
| 78 | 78 | protected function getEndpoint() |
| 79 | 79 | { |
| 80 | - return parent::getEndpoint() . 'UpdateToken'; |
|
| 80 | + return parent::getEndpoint().'UpdateToken'; |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | /** |
@@ -87,9 +87,9 @@ discard block |
||
| 87 | 87 | * |
| 88 | 88 | * @return UpdateCardResponse |
| 89 | 89 | */ |
| 90 | - protected function newResponse($xml) |
|
| 90 | + protected function newResponse( $xml ) |
|
| 91 | 91 | { |
| 92 | - return new UpdateCardResponse($this, $xml); |
|
| 92 | + return new UpdateCardResponse( $this, $xml ); |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | * @param RequestInterface $request |
| 18 | 18 | * @param string $data |
| 19 | 19 | */ |
| 20 | - public function __construct(RequestInterface $request, $data) |
|
| 20 | + public function __construct( RequestInterface $request, $data ) |
|
| 21 | 21 | { |
| 22 | 22 | if ( empty($data) ) |
| 23 | 23 | { |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | $this->request = $request; |
| 28 | - $this->data = $this->xmlDeserialize($data); |
|
| 28 | + $this->data = $this->xmlDeserialize( $data ); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | /** |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | public function getData() |
| 23 | 23 | { |
| 24 | - $this->validate('merchantId', 'merchantPassword', 'acquirerId', 'transactionId'); |
|
| 24 | + $this->validate( 'merchantId', 'merchantPassword', 'acquirerId', 'transactionId' ); |
|
| 25 | 25 | |
| 26 | 26 | $data = [ |
| 27 | 27 | 'AcquirerId' => $this->getAcquirerId(), |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | protected function getEndpoint() |
| 42 | 42 | { |
| 43 | - return parent::getEndpoint() . 'TransactionStatus'; |
|
| 43 | + return parent::getEndpoint().'TransactionStatus'; |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /** |
@@ -50,8 +50,8 @@ discard block |
||
| 50 | 50 | * |
| 51 | 51 | * @return StatusResponse |
| 52 | 52 | */ |
| 53 | - protected function newResponse($xml) |
|
| 53 | + protected function newResponse( $xml ) |
|
| 54 | 54 | { |
| 55 | - return new StatusResponse($this, $xml); |
|
| 55 | + return new StatusResponse( $this, $xml ); |
|
| 56 | 56 | } |
| 57 | 57 | } |
@@ -9,9 +9,9 @@ discard block |
||
| 9 | 9 | * |
| 10 | 10 | * @return string $value Merchant ID. |
| 11 | 11 | */ |
| 12 | - public function setMerchantId($value) |
|
| 12 | + public function setMerchantId( $value ) |
|
| 13 | 13 | { |
| 14 | - return $this->setParameter('merchantId', $value); |
|
| 14 | + return $this->setParameter( 'merchantId', $value ); |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | /** |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | */ |
| 20 | 20 | public function getMerchantId() |
| 21 | 21 | { |
| 22 | - return $this->getParameter('merchantId'); |
|
| 22 | + return $this->getParameter( 'merchantId' ); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | /** |
@@ -27,9 +27,9 @@ discard block |
||
| 27 | 27 | * |
| 28 | 28 | * @return string $value Merchant Password. |
| 29 | 29 | */ |
| 30 | - public function setMerchantPassword($value) |
|
| 30 | + public function setMerchantPassword( $value ) |
|
| 31 | 31 | { |
| 32 | - return $this->setParameter('merchantPassword', $value); |
|
| 32 | + return $this->setParameter( 'merchantPassword', $value ); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public function getMerchantPassword() |
| 39 | 39 | { |
| 40 | - return $this->getParameter('merchantPassword'); |
|
| 40 | + return $this->getParameter( 'merchantPassword' ); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -45,9 +45,9 @@ discard block |
||
| 45 | 45 | * |
| 46 | 46 | * @return string $value Acquirer ID. |
| 47 | 47 | */ |
| 48 | - public function setAcquirerId($value) |
|
| 48 | + public function setAcquirerId( $value ) |
|
| 49 | 49 | { |
| 50 | - return $this->setParameter('acquirerId', $value); |
|
| 50 | + return $this->setParameter( 'acquirerId', $value ); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | /** |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public function getAcquirerId() |
| 57 | 57 | { |
| 58 | - return $this->getParameter('acquirerId'); |
|
| 58 | + return $this->getParameter( 'acquirerId' ); |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /** |
@@ -63,9 +63,9 @@ discard block |
||
| 63 | 63 | * |
| 64 | 64 | * @return boolean $value Require AVS Check. |
| 65 | 65 | */ |
| 66 | - public function setRequireAvsCheck($value) |
|
| 66 | + public function setRequireAvsCheck( $value ) |
|
| 67 | 67 | { |
| 68 | - return $this->setParameter('requireAvsCheck', $value); |
|
| 68 | + return $this->setParameter( 'requireAvsCheck', $value ); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | /** |
@@ -73,6 +73,6 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | public function getRequireAvsCheck() |
| 75 | 75 | { |
| 76 | - return $this->getParameter('requireAvsCheck'); |
|
| 76 | + return $this->getParameter( 'requireAvsCheck' ); |
|
| 77 | 77 | } |
| 78 | 78 | } |