Skip to content
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

### Minimum Gereksinimler
- PHP >= 7.4
- mews/pos ^1.6
- mews/pos ^1.7
- laravel 8, 9, 10, 11, 12

### Kurulum
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"php": ">=7.4",
"illuminate/config": "^8.0|^9.0|^10.0|^11.0|^12.0",
"illuminate/support": "^8.0|^9.0|^10.0|^11.0|^12.0",
"mews/pos": "^1.6"
"mews/pos": "^1.7"
},
"require-dev": {
"orchestra/testbench": "^8.17|^9.0|^10.0|^11.0"
Expand Down
18 changes: 13 additions & 5 deletions config/laravel-pos.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,22 @@

// GarantiPos: ProvisionPassword
'refund_user_password' => null,

// PayForPos only
'mbr_id' => null,
],
'gateway_endpoints' => [ // Required
'payment_api' => null, // Required
'gateway_3d' => null, // Required
'gateway_3d_host' => null,
'query_api' => null,
'payment_api' => null, // Required
'gateway_3d' => null, // Required
'gateway_3d_host' => null,
'query_api' => null,
],
'gateway_configs' => [ // optional
'test_mode' => false, // default: false
// Hash kontrolü kütühaneden dolayı başarısız sonuçlanıyorsa bu ayarla devre dışı bırakılabilir.
// Ancak hash kontrolünün devre dışı bırakılması güvenlik açığı oluşturabilir.
'disable_3d_hash_check' => false, // default: false
],
'test_mode' => false,
],
],
];
39 changes: 37 additions & 2 deletions docs/EXAMPLE_CONFIGURATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,22 @@ return [

// GarantiPos: ProvisionPassword
'refund_user_password' => null,

// PayForPos: MbrId
'mbr_id' => null,
],
'gateway_endpoints' => [ // Required
'payment_api' => null, // Required
'gateway_3d' => null, // Required
'gateway_3d_host' => null,
'query_api' => null,
],
'test_mode' => false,
'gateway_configs' => [ // optional
'test_mode' => false, // default: false
// Hash kontrolü kütühaneden dolayı başarısız sonuçlanıyorsa bu ayarla devre dışı bırakılabilir.
// Ancak hash kontrolünün devre dışı bırakılması güvenlik açığı oluşturabilir.
'disable_3d_hash_check' => false, // default: false
],
],
],
];
Expand All @@ -84,7 +92,6 @@ return [
'estpos_payten' => [
'gateway_class' => \Mews\Pos\Gateways\EstV3Pos::class,
'lang' => \Mews\Pos\PosInterface::LANG_TR, // optional
'test_mode' => true, // optional
'credentials' => [
'payment_model' => \Mews\Pos\PosInterface::MODEL_3D_SECURE,
'merchant_id' => '700XXXXXXX',
Expand Down Expand Up @@ -134,13 +141,34 @@ return [
'user_name' => 'QNB_API_XXXXXXXX', // UserCode: Otorizasyon sistemi kullanıcı kodu.
'user_password' => 'XXXXXXXX', // Otorizasyon sistemi kullanıcı şifresi.
'enc_key' => 'XXXXXXXX', // MerchantPass: 3D Secure şifresidir.
'mbr_id' => \Mews\Pos\Entity\Account\PayForAccount::MBR_ID_FINANSBANK, // veya MBR_ID_ZIRAAT_KATILIM (Kurum Kodu)
],
'gateway_endpoints' => [
'payment_api' => 'https://vpostest.qnbfinansbank.com/Gateway/XMLGate.aspx',
'gateway_3d' => 'https://vpostest.qnbfinansbank.com/Gateway/Default.aspx',
'gateway_3d_host' => 'https://vpostest.qnbfinansbank.com/Gateway/3DHost.aspx',
],
],
'payfor_ziraat_katilim' => [
'gateway_class' => \Mews\Pos\Gateways\PayForPos::class,
'credentials' => [
'payment_model' => \Mews\Pos\PosInterface::MODEL_3D_SECURE,
'merchant_id' => '08530000XXXXXXXX', // Üye İşyeri Numarası.
'user_name' => 'ZIRAAT_KATILIM_API_XXXXXXXX', // UserCode: Otorizasyon sistemi kullanıcı kodu.
'user_password' => 'XXXXXXXX', // Otorizasyon sistemi kullanıcı şifresi.
'enc_key' => 'XXXXXXXX', // MerchantPass: 3D Secure şifresidir.
'mbr_id' => \Mews\Pos\Entity\Account\PayForAccount::MBR_ID_ZIRAAT_KATILIM, // (Kurum Kodu)
],
'gateway_configs' => [
// Ziraat Katilim için hash kontrolü çalışmıyor. O yüzden devre dışı bırakıyoruz.
'disable_3d_hash_check' => true,
],
'gateway_endpoints' => [
'payment_api' => 'https://payfortestziraatkatilim.cordisnetwork.com/Mpi/XMLGate.aspx',
'gateway_3d' => 'https://payfortestziraatkatilim.cordisnetwork.com/Mpi/Default.aspx',
'gateway_3d_host' => 'https://payfortestziraatkatilim.cordisnetwork.com/Mpi/3DHost.aspx',
],
],
'garanti' => [
'gateway_class' => \Mews\Pos\Gateways\GarantiPos::class,
'credentials' => [
Expand All @@ -157,6 +185,9 @@ return [
'payment_api' => 'https://sanalposprovtest.garantibbva.com.tr/VPServlet',
'gateway_3d' => 'https://sanalposprovtest.garantibbva.com.tr/servlet/gt3dengine',
],
'gateway_configs' => [ // optional
'test_mode' => true, // test ortamı için true
],
],
'interpos_denizbank' => [
'gateway_class' => \Mews\Pos\Gateways\InterPos::class,
Expand All @@ -182,6 +213,10 @@ return [
'user_name' => 'apiXXXXXXXX', // UserName: https://kurumsal.kuveytturk.com.tr adresine login olarak kullanıcı işlemleri sayfasında APİ rolünde kullanıcı oluşturulmalıdır.
'enc_key' => 'ApiXXXXXXXX', // Password: Oluşturulan APİ kullanıcısının şifre bilgisidir.
],
'gateway_configs' => [
// Testlerinizi SSL olmayan ortamda yapıyorsanız true yapmanız gerekir.
'test_mode' => true,
],
'gateway_endpoints' => [
'payment_api' => 'https://boatest.kuveytturk.com.tr/boa.virtualpos.services/Home',
'gateway_3d' => 'https://boatest.kuveytturk.com.tr/boa.virtualpos.services/Home/ThreeDModelPayGate',
Expand Down
2 changes: 2 additions & 0 deletions src/Factory/AccountFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Mews\Pos\Entity\Account\AbstractPosAccount;
use Mews\Pos\Entity\Account\PayFlexAccount;
use Mews\Pos\Entity\Account\PayForAccount;
use Mews\Pos\Exceptions\MissingAccountInfoException;
use Mews\Pos\Factory\AccountFactory as MewsPosAccountFactory;
use Mews\Pos\Gateways\AkbankPos;
Expand Down Expand Up @@ -69,6 +70,7 @@ public static function create(string $gatewayClass, string $name, array $credent
$credentials['payment_model'],
$credentials['enc_key'] ?? null,
$lang,
$credentials['mbr_id'] ?? PayForAccount::MBR_ID_FINANSBANK,
);
case GarantiPos::class:
return MewsPosAccountFactory::createGarantiPosAccount(
Expand Down
9 changes: 7 additions & 2 deletions src/Factory/GatewayFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ public static function create(

/** @var PosInterface $gateway */
$gateway = new $gatewayClass(
['gateway_endpoints' => $options['gateway_endpoints']],
[
'gateway_endpoints' => $options['gateway_endpoints'],
'gateway_configs' => $options['gateway_configs'] ?? [],
],
$account,
$requestDataMapper,
$responseDataMapper,
Expand All @@ -61,7 +64,9 @@ public static function create(
$logger,
);

$gateway->setTestMode($options['test_mode'] ?? false);
if (!isset($options['gateway_configs']['test_mode']) && isset($options['test_mode'])) {
$gateway->setTestMode($options['test_mode']);
}

return $gateway;
}
Expand Down