PHP code example of mews / pos
1. Go to this page and download the library: Download mews/pos library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mews / pos example snippets
return [
// Banka sanal pos tanımlamaları
'banks' => [
'akbank' => [
'name' => 'AKBANK T.A.S.',
'class' => Mews\Pos\Gateways\EstV3Pos::class,
'gateway_endpoints' => [
'payment_api' => 'https://www.sanalakpos.com/fim/api',
'gateway_3d' => 'https://www.sanalakpos.com/fim/est3Dgate',
'gateway_3d_host' => 'https://sanalpos.sanalakpos.com.tr/fim/est3Dgate',
],
],
// Yeni eklenen banka
'isbank' => [
'name' => 'İŞ BANKASI .A.S.',
'class' => \Mews\Pos\Gateways\EstV3Pos::class, // Altyapı sınıfı
'gateway_endpoints' => [
'payment_api' => 'https://sanalpos.isbank.com.tr/fim/api',
'gateway_3d' => 'https://sanalpos.isbank.com.tr/fim/est3Dgate',
],
],
]
];
//yeni ayar yolu ya da degeri
$yeniAyarlar = osGateway($account, $yeniAyarlar, $eventDispatcher);
$handler = new \Monolog\Handler\StreamHandler(__DIR__.'/../var/log/pos.log', \Psr\Log\LogLevel::DEBUG);
$logger = new \Monolog\Logger('pos', [$handler]);
$pos = \Mews\Pos\Factory\PosFactory::createPosGateway(
$account,
$config,
$eventDispatcher,
null,
$logger
);
sh
$ cp ./vendor/mews/pos/config/pos_production.php ./pos_ayarlar.php