Skip to content

Commit

Permalink
issue #205 EstPos remove cardType to support TROY card
Browse files Browse the repository at this point in the history
  • Loading branch information
nuryagdym committed May 17, 2024
1 parent e173399 commit 35195d7
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 20 deletions.
7 changes: 0 additions & 7 deletions examples/payten/_payment_config.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

use Mews\Pos\Entity\Card\CreditCardInterface;

require __DIR__.'/../_main_config.php';

$bankTestsUrl = $hostUrl.'/payten';
Expand All @@ -14,31 +12,27 @@
'month' => '12',
'cvv' => '000',
'name' => 'John Doe',
'type' => CreditCardInterface::CARD_TYPE_VISA,
],
'visaZiraat' => [
'number' => '4546711234567894',
'year' => '26',
'month' => '12',
'cvv' => '000',
'name' => 'John Doe',
'type' => CreditCardInterface::CARD_TYPE_VISA,
],
'masterZiraat' => [
'number' => '5401341234567891',
'year' => '26',
'month' => '12',
'cvv' => '000',
'name' => 'John Doe',
'type' => CreditCardInterface::CARD_TYPE_MASTERCARD,
],
'visa1' => [
'number' => '4546711234567894',
'year' => '26',
'month' => '12',
'cvv' => '000',
'name' => 'John Doe',
'type' => CreditCardInterface::CARD_TYPE_VISA,
],
'visa_isbank_imece' => [
/**
Expand All @@ -52,6 +46,5 @@
'month' => '10',
'cvv' => '123',
'name' => 'John Doe',
'type' => CreditCardInterface::CARD_TYPE_VISA,
],
];
9 changes: 0 additions & 9 deletions src/DataMapper/RequestDataMapper/EstPosRequestDataMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,6 @@ class EstPosRequestDataMapper extends AbstractRequestDataMapper
PosInterface::TX_TYPE_HISTORY => 'ORDERHISTORY',
];

/**
* {@inheritdoc}
*/
protected array $cardTypeMapping = [
CreditCardInterface::CARD_TYPE_VISA => '1',
CreditCardInterface::CARD_TYPE_MASTERCARD => '2',
];

/**
* {@inheritdoc}
*/
Expand Down Expand Up @@ -286,7 +278,6 @@ protected function create3DFormDataCommon(AbstractPosAccount $posAccount, array
];

if ($creditCard instanceof CreditCardInterface) {
$inputs['cardType'] = $this->cardTypeMapping[$creditCard->getType()];
$inputs['pan'] = $creditCard->getNumber();
$inputs['Ecom_Payment_Card_ExpDate_Month'] = $creditCard->getExpireMonth(self::CREDIT_CARD_EXP_MONTH_FORMAT);
$inputs['Ecom_Payment_Card_ExpDate_Year'] = $creditCard->getExpireYear(self::CREDIT_CARD_EXP_YEAR_FORMAT);
Expand Down
2 changes: 0 additions & 2 deletions src/Gateways/EstPos.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

/**
* Implementation of Payten Payment Gateway
* todo cardType verisi dokumantasyona gore kontrol edilmesi gerekiyor.
* cardType gondermeden de su an calisiyor.
*
* @deprecated use Mews\Pos\Gateways\EstV3Pos.
* For security reasons this class which uses sha1 hashing algorithm is not recommended to use.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,6 @@ public static function threeDFormDataProvider(): array
'taksit' => '',
'islemtipi' => 'Auth',
'hash' => 'TN+2/D8lijFd+5zAUar6SH6EiRY=',
'cardType' => '1',
'pan' => '5555444433332222',
'Ecom_Payment_Card_ExpDate_Month' => '01',
'Ecom_Payment_Card_ExpDate_Year' => '22',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ public static function threeDFormDataProvider(): array
'TranType' => 'Auth',
'hashAlgorithm' => 'ver3',
'hash' => '3fvBzh0HT3UiKUTXis0Ke2NG3mAp9eBOwx26bstv+l6L946GrOF2JklXfqTNc6VBeqUSkuLxo4ErtwCWuPCzYw==',
'cardType' => '1',
'pan' => '5555444433332222',
'Ecom_Payment_Card_ExpDate_Month' => '01',
'Ecom_Payment_Card_ExpDate_Year' => '22',
Expand Down

0 comments on commit 35195d7

Please sign in to comment.