Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue #205 EstPos remove cardType to support TROY card #209

Merged
merged 1 commit into from
May 17, 2024
Merged
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
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
Loading