Skip to content

Commit

Permalink
Merge pull request #113 from umuttaymaz/est-3d-pay-hosting-model
Browse files Browse the repository at this point in the history
EST Pos için 3D Pay Hosting Ödeme Modeli eklendi
  • Loading branch information
nuryagdym authored Jan 28, 2023
2 parents 183deca + 4b12c12 commit 118645c
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 5 deletions.
23 changes: 23 additions & 0 deletions examples/akbank/3d-pay-hosting/_config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

use Mews\Pos\Gateways\AbstractGateway;

require '../_payment_config.php';

$baseUrl = $bankTestsUrl.'/3d-pay-hosting/';
//account bilgileri kendi account bilgilerinizle degistiriniz
$account = \Mews\Pos\Factory\AccountFactory::createEstPosAccount(
'isbank',
'700655000200',
'ISBANKAPI',
'ISBANK07',
\Mews\Pos\Gateways\AbstractGateway::MODEL_3D_PAY_HOSTING,
'TRPS0200',
AbstractGateway::LANG_TR
);

$pos = getGateway($account);

$transaction = \Mews\Pos\Gateways\AbstractGateway::TX_PAY;

$templateTitle = '3D Pay Hosting Model Payment';
3 changes: 3 additions & 0 deletions examples/akbank/3d-pay-hosting/form.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

require '../../_common-codes/3d/form.php';
3 changes: 3 additions & 0 deletions examples/akbank/3d-pay-hosting/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

require '../../_common-codes/3d/index.php';
4 changes: 4 additions & 0 deletions examples/akbank/3d-pay-hosting/response.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php

$card = null;
require '../../template/_payment_response.php';
4 changes: 4 additions & 0 deletions examples/akbank/_payment_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
'path' => '/3d-pay/index.php',
'label' => '3D Pay Ödeme',
],
AbstractGateway::MODEL_3D_PAY_HOSTING => [
'path' => '/3d-pay-hosting/index.php',
'label' => '3D Pay Hosting Ödeme',
],
AbstractGateway::MODEL_3D_HOST => [
'path' => '/3d-host/index.php',
'label' => '3D Host Ödeme',
Expand Down
9 changes: 5 additions & 4 deletions src/DataMapper/EstPosRequestDataMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ class EstPosRequestDataMapper extends AbstractRequestDataMapperCrypt
* {@inheritdoc}
*/
protected $secureTypeMappings = [
AbstractGateway::MODEL_3D_SECURE => '3d',
AbstractGateway::MODEL_3D_PAY => '3d_pay',
AbstractGateway::MODEL_3D_HOST => '3d_host',
AbstractGateway::MODEL_NON_SECURE => 'regular',
AbstractGateway::MODEL_3D_SECURE => '3d',
AbstractGateway::MODEL_3D_PAY => '3d_pay',
AbstractGateway::MODEL_3D_PAY_HOSTING => '3d_pay_hosting',
AbstractGateway::MODEL_3D_HOST => '3d_host',
AbstractGateway::MODEL_NON_SECURE => 'regular',
];

/**
Expand Down
3 changes: 2 additions & 1 deletion src/Gateways/AbstractGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ abstract class AbstractGateway implements PosInterface

public const MODEL_3D_SECURE = '3d';
public const MODEL_3D_PAY = '3d_pay';
public const MODEL_3D_PAY_HOSTING = '3d_pay_hosting';
public const MODEL_3D_HOST = '3d_host';
public const MODEL_NON_SECURE = 'regular';

Expand Down Expand Up @@ -290,7 +291,7 @@ public function payment($card = null)
$this->makeRegularPayment();
} elseif (self::MODEL_3D_SECURE === $model) {
$this->make3DPayment($request);
} elseif (self::MODEL_3D_PAY === $model) {
} elseif (self::MODEL_3D_PAY === $model || self::MODEL_3D_PAY_HOSTING === $model) {
$this->make3DPayPayment($request);
} elseif (self::MODEL_3D_HOST === $model) {
$this->make3DHostPayment($request);
Expand Down

0 comments on commit 118645c

Please sign in to comment.