Skip to content

Commit

Permalink
Merge pull request #107 from erdalceylan/master
Browse files Browse the repository at this point in the history
ExpireDate format param bug fix
  • Loading branch information
ibrahimgunduz34 authored Apr 11, 2018
2 parents b7c05c8 + 3d9ee5f commit 56e3ba9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions src/Pos/Gvp.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,8 @@ private function buildCustomer()
*/
private function buildCard(Request $request)
{
$expireMonth = $this->expireDateFormatter->format(
$request->getExpireMonth(),
$request->getExpireYear()
);
$expireMonth = $this->expireDateFormatter->format([$request->getExpireMonth(), $request->getExpireYear()]);

return array(
'Number' => $request->getCardNumber(),
'ExpireDate' => $expireMonth,
Expand Down
4 changes: 2 additions & 2 deletions src/Pos/NestPay.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ protected function buildPreAuthorizationRequest(Request $request)
$amount = $this->amountFormatter->format($request->getAmount());
$installment = $this->installmentFormatter->format($request->getInstallment());
$currency = $this->currencyFormatter->format($request->getCurrency());
$expireMonth = $this->expireDateFormatter->format($request->getExpireMonth(), $request->getExpireYear());
$expireMonth = $this->expireDateFormatter->format([$request->getExpireMonth(), $request->getExpireYear()]);
$type = $this->getProviderTransactionType(self::TRANSACTION_TYPE_PREAUTHORIZATION);
$requestData = array(
'Type' => $type,
Expand Down Expand Up @@ -142,7 +142,7 @@ protected function buildSaleRequest(Request $request)
$amount = $this->amountFormatter->format($request->getAmount());
$installment = $this->installmentFormatter->format($request->getInstallment());
$currency = $this->currencyFormatter->format($request->getCurrency());
$expireMonth = $this->expireDateFormatter->format($request->getExpireMonth(), $request->getExpireYear());
$expireMonth = $this->expireDateFormatter->format([$request->getExpireMonth(), $request->getExpireYear()]);
$type = $this->getProviderTransactionType(self::TRANSACTION_TYPE_SALE);
$requestData = array(
'Type' => $type,
Expand Down
4 changes: 2 additions & 2 deletions src/Pos/Posnet.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ protected function buildPreauthorizationRequest(Request $request)
$amount = $this->amountFormatter->format($request->getAmount());
$installment = $this->installmentFormatter->format($request->getInstallment());
$currency = $this->currencyFormatter->format($request->getCurrency());
$expireMonth = $this->expireDateFormatter->format($request->getExpireMonth(), $request->getExpireYear());
$expireMonth = $this->expireDateFormatter->format([$request->getExpireMonth(), $request->getExpireYear()]);
$type = $this->getProviderTransactionType(self::TRANSACTION_TYPE_PREAUTHORIZATION);
$requestData = array(
$type => array(
Expand Down Expand Up @@ -156,7 +156,7 @@ protected function buildSaleRequest(Request $request)
$amount = $this->amountFormatter->format($request->getAmount());
$installment = $this->installmentFormatter->format($request->getInstallment());
$currency = $this->currencyFormatter->format($request->getCurrency());
$expireMonth = $this->expireDateFormatter->format($request->getExpireMonth(), $request->getExpireYear());
$expireMonth = $this->expireDateFormatter->format([$request->getExpireMonth(), $request->getExpireYear()]);
$type = $this->getProviderTransactionType(self::TRANSACTION_TYPE_SALE);
$requestData = array(
$type => array(
Expand Down

0 comments on commit 56e3ba9

Please sign in to comment.