diff --git "a/.github/ISSUE_TEMPLATE/hata-bildirimi-i\303\247in.md" b/.github/ISSUE_TEMPLATE/hata-bildirimi-icin.md similarity index 100% rename from ".github/ISSUE_TEMPLATE/hata-bildirimi-i\303\247in.md" rename to .github/ISSUE_TEMPLATE/hata-bildirimi-icin.md diff --git "a/.github/ISSUE_TEMPLATE/sorular\304\261n\304\261z-i\303\247in.md" b/.github/ISSUE_TEMPLATE/sorulariniz-icin.md similarity index 100% rename from ".github/ISSUE_TEMPLATE/sorular\304\261n\304\261z-i\303\247in.md" rename to .github/ISSUE_TEMPLATE/sorulariniz-icin.md diff --git a/README.md b/README.md index a9e30612..9493eb1b 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,8 @@ Bu paket ile amaçlanan; ortak bir arayüz sınıfı ile, tüm Türk banka sanal - **VakifBank GET 7/24 MPI ve VPOS 7/24** 3D Secure ödemesi çalışır durumda, diğer işlemlerde sorunlar ortaya çıktıkça giderilecek. +- **VakifBank Common Payment (Ortak Ödeme)** 3DPay ve 3DHost ödeme desteği eklendi. + - **InterPOS (Deniz bank)** destegi eklenmiştir, test edildikçe, sorunlar bulundukça hatalar giderilecek. - **Kuveyt POS** 3d secure ödeme desteği eklenmiştir - testleri yapıldı, calışıyor. diff --git a/composer.json b/composer.json index 39515ed5..ec07236c 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,8 @@ "php-http/curl-client": "^2.2", "phpstan/phpstan": "^1.9", "phpstan/phpstan-strict-rules": "^1.4", - "phpunit/phpunit": "^8.3", + "phpunit/phpunit": "^8.5", + "rector/rector": "^0.15.12", "slim/psr7": "^1.4", "squizlabs/php_codesniffer": "^3.5", "symfony/var-dumper": "^5.1" diff --git a/config/pos.php b/config/pos.php index f784a941..f44127ca 100644 --- a/config/pos.php +++ b/config/pos.php @@ -3,8 +3,8 @@ return [ //if you need to use custom keys for currency mapping, otherwise leave empty 'currencies' => [ -// 'TRY' => 949, -// 'USD' => 840, +// 'TRY' => '949', +// 'USD' => '840', ], // Banks 'banks' => [ @@ -160,6 +160,22 @@ ], ], ], + 'vakifbank-cp' => [ + 'name' => 'VakifBank-POS-Common-Payment', + 'class' => Mews\Pos\Gateways\VakifBankCPPos::class, + 'urls' => [ + 'production' => 'https://cpweb.vakifbank.com.tr/CommonPayment/api/RegisterTransaction', + 'test' => 'https://cptest.vakifbank.com.tr/CommonPayment/api/RegisterTransaction', + 'gateway' => [ + 'production' => 'https://cpweb.vakifbank.com.tr/CommonPayment/SecurePayment', + 'test' => 'https://cptest.vakifbank.com.tr/CommonPayment/SecurePayment', + ], + 'query' => [ + 'production' => 'https://cpweb.vakifbank.com.tr/CommonPayment/api/VposTransaction', + 'test' => 'https://cptest.vakifbank.com.tr/CommonPayment/api/VposTransaction', + ], + ], + ], 'denizbank' => [ 'name' => 'DenizBank-InterPos', 'class' => Mews\Pos\Gateways\InterPos::class, diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index bba16a72..ffc3cddd 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [0.12.0] - 2023-03-13 +### New Features +- Vakıfbank Common Payment (Ortak Ödeme) gateway desteği eklendi (`VakifBankCPPos`). + Sadece **3DPay** ve **3DHost** ödeme destekleri eklendi. + Örnek kodlar `examples/vakifbank-cp/` altında yer almaktadır. + +### Changed +- **EstPos** - `MODEL_3D_PAY_HOSTING` desteği eklendi @umuttaymaz. +- `get3DFormData()` - artık zorunlu _kart_ veya _sipariş_ bilgileri olmadan çağrıldığında istisna fırlatır. +- `get3DFormData()` - dönen değere HTTP methodu eklendi. Örn: `'method' => 'POST'` (ya da GET); + +### Fixed +- **Vakifbank** - bazı _undefined index_ hatalar giderildi. +- `VakifBankPosRequestDataMapper` - `OrderDescription` tanımsız olma durumu giderildi. + ## [0.11.0] - 2023-01-08 ### Changed - Response formatı **object** yerine artık **array** olarak değiştirildi, `$pos->getResponse();` kod artık array döner. diff --git a/examples/_common-codes/3d-host/index.php b/examples/_common-codes/3d-host/index.php index c9ee9956..ce3ed78d 100644 --- a/examples/_common-codes/3d-host/index.php +++ b/examples/_common-codes/3d-host/index.php @@ -1,7 +1,7 @@ get3DFormData(); -require '../../template/_redirect_form.php'; -require '../../template/_footer.php'; +require '../../_templates/_redirect_form.php'; +require '../../_templates/_footer.php'; diff --git a/examples/_common-codes/3d/form.php b/examples/_common-codes/3d/form.php index ac7478d3..a0c6de21 100644 --- a/examples/_common-codes/3d/form.php +++ b/examples/_common-codes/3d/form.php @@ -3,7 +3,7 @@ use Symfony\Component\HttpFoundation\RedirectResponse; require '_config.php'; -require '../../template/_header.php'; +require '../../_templates/_header.php'; if ($request->getMethod() !== 'POST') { echo new RedirectResponse($baseUrl.'index.php'); @@ -38,5 +38,5 @@ } -require '../../template/_redirect_form.php'; -require '../../template/_footer.php'; +require '../../_templates/_redirect_form.php'; +require '../../_templates/_footer.php'; diff --git a/examples/_common-codes/3d/index.php b/examples/_common-codes/3d/index.php index a66cc79a..83ba496f 100644 --- a/examples/_common-codes/3d/index.php +++ b/examples/_common-codes/3d/index.php @@ -1,10 +1,10 @@ request->all()); -require '../../template/_payment_response.php'; +require '../../_templates/_payment_response.php'; diff --git a/examples/template/_credit_card_form.php b/examples/_templates/_credit_card_form.php similarity index 100% rename from examples/template/_credit_card_form.php rename to examples/_templates/_credit_card_form.php diff --git a/examples/template/_footer.php b/examples/_templates/_footer.php similarity index 98% rename from examples/template/_footer.php rename to examples/_templates/_footer.php index 50325810..c99eadaa 100644 --- a/examples/template/_footer.php +++ b/examples/_templates/_footer.php @@ -1,4 +1,4 @@ - + diff --git a/examples/template/_header.php b/examples/_templates/_header.php similarity index 94% rename from examples/template/_header.php rename to examples/_templates/_header.php index 88cf1be5..f67586d6 100644 --- a/examples/template/_header.php +++ b/examples/_templates/_header.php @@ -30,7 +30,8 @@