[PR #75] [MERGED] Refactored all pos gateways to use data mapper #198

Closed
opened 2026-03-03 15:43:53 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mewebstudio/pos/pull/75
Author: @nuryagdym
Created: 5/15/2022
Status: Merged
Merged: 5/17/2022
Merged by: @nuryagdym

Base: masterHead: refactored-pos-gateways-to-use-data-mapper


📝 Commits (10+)

  • 098fef5 created PayForPosRequestDataMapper and refactored PayForPos
  • ea707f7 AbstractRequestDataMapper added mapCurrency() method
  • 8f9d8ea created PosNetRequestDataMapper and refactored PosNet
  • 65c6c35 updated some gateways to use AbstractRequestDataMapper::mapCurrency()
  • 322a6d1 refactord VakifBankPos and VakifBankPosRequestDataMapper
  • b7d5499 InterPosRequestDataMapper added MOTO constant
  • 460b2df added test mode for AbstractRequestDataMapper
  • bcc4c84 created GarantiPosRequestDataMapper and refactored GarantiPos
  • f55f149 GarantiPosRequestDataMapper removed unnecessary fields
  • bfbab3f GarantiPosRequestDataMapper removed MotoInd value with constant

📊 Changes

71 files changed (+5129 additions, -3890 deletions)

View changed files

📝 README.md (+43 -29)
📝 config/pos.php (+8 -0)
📝 docs/CHANGELOG.md (+55 -0)
📝 examples/_common-codes/3d-host/index.php (+9 -1)
📝 examples/_common-codes/3d/form.php (+10 -1)
📝 examples/_common-codes/regular/form.php (+9 -1)
📝 examples/akbank/3d-host/_config.php (+4 -2)
📝 examples/akbank/3d-pay/_config.php (+4 -2)
📝 examples/akbank/3d/_config.php (+4 -2)
📝 examples/akbank/_payment_config.php (+3 -2)
📝 examples/akbank/regular/_config.php (+1 -1)
📝 examples/finansbank-payfor/3d-host/_config.php (+1 -1)
📝 examples/finansbank-payfor/3d-pay/_config.php (+1 -1)
📝 examples/finansbank-payfor/3d/_config.php (+1 -1)
📝 examples/finansbank-payfor/_payment_config.php (+3 -2)
📝 examples/finansbank-payfor/regular/_config.php (+1 -1)
📝 examples/garanti/3d-pay/_config.php (+1 -1)
📝 examples/garanti/3d/_config.php (+1 -1)
📝 examples/garanti/_payment_config.php (+10 -2)
📝 examples/garanti/regular/_config.php (+1 -1)

...and 51 more files

📄 Description

Fixes

  • InterPOS - fix ShopCode error
  • EstPOS - fix undefined index error on invalid hash request
  • EstPOS - fix installment not working for 3D Secure

İyileştirmeler

  • EstPOS - make IP address optional
  • Siparişde currency ve installment artık zorunlu değil. Varsayılan olarak currency=TRY, installment=0 olarak kabul edilir.
  • AccountFactory - added helpful comments
  • GarantiPos - tekrarlanan (recurring) ödeme desteği teklendi.

Breaking changes

  • Language (tr, en) degerleri artık sadece AbstractGateway üzerinden tanımlanıyor.
  • Bütün gateway sınıflarında istek verilerini hazırlama Request Data Mapper'lere taşındı.
  • \Mews\Pos\PosInterface::prepare() method artık sipariş verilerini (currency, id, amount, installment, transaction type) değiştirmez/formatlamaz. Sipariş verilerinin formatlanmasını artık Data Request Mapper'de (örn. PosNetRequestDataMapper) istek göndermeden önce yapılır.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mewebstudio/pos/pull/75 **Author:** [@nuryagdym](https://github.com/nuryagdym) **Created:** 5/15/2022 **Status:** ✅ Merged **Merged:** 5/17/2022 **Merged by:** [@nuryagdym](https://github.com/nuryagdym) **Base:** `master` ← **Head:** `refactored-pos-gateways-to-use-data-mapper` --- ### 📝 Commits (10+) - [`098fef5`](https://github.com/mewebstudio/pos/commit/098fef59195b5839b5a8ba35df806d73746f2e5c) created PayForPosRequestDataMapper and refactored PayForPos - [`ea707f7`](https://github.com/mewebstudio/pos/commit/ea707f70556bf0c242bb8f77b7270ee6671a12d1) AbstractRequestDataMapper added mapCurrency() method - [`8f9d8ea`](https://github.com/mewebstudio/pos/commit/8f9d8ea22a86e1f55abf436da1810ee08a790a25) created PosNetRequestDataMapper and refactored PosNet - [`65c6c35`](https://github.com/mewebstudio/pos/commit/65c6c35bdb59b29502fdfa3772e89cf9d0967f2b) updated some gateways to use AbstractRequestDataMapper::mapCurrency() - [`322a6d1`](https://github.com/mewebstudio/pos/commit/322a6d1a85fdb9988fe3caa18297f61d0032493f) refactord VakifBankPos and VakifBankPosRequestDataMapper - [`b7d5499`](https://github.com/mewebstudio/pos/commit/b7d54993a97b7c18cbaa7a96453831277aa93451) InterPosRequestDataMapper added MOTO constant - [`460b2df`](https://github.com/mewebstudio/pos/commit/460b2df074024d663b17fcbc2efce3c2262aecd5) added test mode for AbstractRequestDataMapper - [`bcc4c84`](https://github.com/mewebstudio/pos/commit/bcc4c8419b8f73d08a818c0e9626d519f2ea2f40) created GarantiPosRequestDataMapper and refactored GarantiPos - [`f55f149`](https://github.com/mewebstudio/pos/commit/f55f1499737c1bb848e25000709871f236f42fbb) GarantiPosRequestDataMapper removed unnecessary fields - [`bfbab3f`](https://github.com/mewebstudio/pos/commit/bfbab3f7392ffd6ee2288ade86d6c47f5e753b6b) GarantiPosRequestDataMapper removed MotoInd value with constant ### 📊 Changes **71 files changed** (+5129 additions, -3890 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+43 -29) 📝 `config/pos.php` (+8 -0) 📝 `docs/CHANGELOG.md` (+55 -0) 📝 `examples/_common-codes/3d-host/index.php` (+9 -1) 📝 `examples/_common-codes/3d/form.php` (+10 -1) 📝 `examples/_common-codes/regular/form.php` (+9 -1) 📝 `examples/akbank/3d-host/_config.php` (+4 -2) 📝 `examples/akbank/3d-pay/_config.php` (+4 -2) 📝 `examples/akbank/3d/_config.php` (+4 -2) 📝 `examples/akbank/_payment_config.php` (+3 -2) 📝 `examples/akbank/regular/_config.php` (+1 -1) 📝 `examples/finansbank-payfor/3d-host/_config.php` (+1 -1) 📝 `examples/finansbank-payfor/3d-pay/_config.php` (+1 -1) 📝 `examples/finansbank-payfor/3d/_config.php` (+1 -1) 📝 `examples/finansbank-payfor/_payment_config.php` (+3 -2) 📝 `examples/finansbank-payfor/regular/_config.php` (+1 -1) 📝 `examples/garanti/3d-pay/_config.php` (+1 -1) 📝 `examples/garanti/3d/_config.php` (+1 -1) 📝 `examples/garanti/_payment_config.php` (+10 -2) 📝 `examples/garanti/regular/_config.php` (+1 -1) _...and 51 more files_ </details> ### 📄 Description ## Fixes - InterPOS - fix ShopCode error - EstPOS - fix undefined index error on invalid hash request - EstPOS - fix installment not working for 3D Secure ## İyileştirmeler - EstPOS - make IP address optional - Siparişde `currency` ve `installment` artık zorunlu değil. Varsayılan olarak `currency=TRY`, `installment=0` olarak kabul edilir. - AccountFactory - added helpful comments - GarantiPos - tekrarlanan (recurring) ödeme desteği teklendi. ## Breaking changes - Language (tr, en) degerleri artık sadece `AbstractGateway` üzerinden tanımlanıyor. - Bütün gateway sınıflarında istek verilerini hazırlama Request Data Mapper'lere taşındı. - `\Mews\Pos\PosInterface::prepare()` method artık sipariş verilerini (_currency, id, amount, installment, transaction type_) değiştirmez/formatlamaz. Sipariş verilerinin formatlanmasını artık Data Request Mapper'de (örn. _PosNetRequestDataMapper_) istek göndermeden önce yapılır. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 15:43:53 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/pos#198
No description provided.