[PR #66] [MERGED] Refactor methods for better testing #189

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

📋 Pull Request Information

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

Base: masterHead: refactor-methods-for-better-testing


📝 Commits (4)

  • 4c150f2 update some methods to be more testable
  • 1da93c2 examples - fix ykb url
  • e7ee663 replaced card types with constants
  • a283159 added unit tests for some credit cards

📊 Changes

27 files changed (+322 additions, -121 deletions)

View changed files

📝 examples/akbank/_payment_config.php (+2 -1)
📝 examples/finansbank-payfor/_payment_config.php (+2 -1)
📝 examples/garanti/_payment_config.php (+2 -1)
📝 examples/interpos/_payment_config.php (+3 -2)
📝 examples/vakifbank/_payment_config.php (+2 -1)
📝 examples/ykb/3d/_config.php (+1 -1)
📝 examples/ykb/_payment_config.php (+2 -1)
📝 src/Entity/Card/AbstractCreditCard.php (+5 -0)
📝 src/Entity/Card/CreditCardEstPos.php (+2 -2)
📝 src/Entity/Card/CreditCardInterPos.php (+3 -3)
📝 src/Entity/Card/CreditCardVakifBank.php (+4 -4)
📝 src/Gateways/AbstractGateway.php (+15 -13)
📝 src/Gateways/EstPos.php (+11 -15)
📝 src/Gateways/GarantiPos.php (+10 -12)
📝 src/Gateways/InterPos.php (+12 -14)
📝 src/Gateways/PayForPos.php (+9 -12)
📝 src/Gateways/PosNet.php (+13 -18)
📝 src/Gateways/VakifBankPos.php (+8 -8)
📝 src/PosInterface.php (+11 -6)
📝 tests/Entity/Card/CreditCardEstPosTest.php (+2 -1)

...and 7 more files

📄 Description

  • added $request parameter to make3DPayment(), make3DPayPayment(), make3DHostPayment() methods to make them more testable
  • send() method now returns response data instead of $this to make it more testable.
  • replaced card types (visa, master) with constants.
  • fixed invalid URL in POSNet examples
  • added more unit tests for some credit card classes

🔄 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/66 **Author:** [@nuryagdym](https://github.com/nuryagdym) **Created:** 4/15/2022 **Status:** ✅ Merged **Merged:** 4/15/2022 **Merged by:** [@nuryagdym](https://github.com/nuryagdym) **Base:** `master` ← **Head:** `refactor-methods-for-better-testing` --- ### 📝 Commits (4) - [`4c150f2`](https://github.com/mewebstudio/pos/commit/4c150f2edf6225b12ac77ff7a82f58c6a828ca3a) update some methods to be more testable - [`1da93c2`](https://github.com/mewebstudio/pos/commit/1da93c2ec907afc5eef154ec8a10d274565c5bf8) examples - fix ykb url - [`e7ee663`](https://github.com/mewebstudio/pos/commit/e7ee6632be90989677a1d8cbe8255199bfa55b9c) replaced card types with constants - [`a283159`](https://github.com/mewebstudio/pos/commit/a283159abc54fcbfe9b76d682c3166fc7c0dc180) added unit tests for some credit cards ### 📊 Changes **27 files changed** (+322 additions, -121 deletions) <details> <summary>View changed files</summary> 📝 `examples/akbank/_payment_config.php` (+2 -1) 📝 `examples/finansbank-payfor/_payment_config.php` (+2 -1) 📝 `examples/garanti/_payment_config.php` (+2 -1) 📝 `examples/interpos/_payment_config.php` (+3 -2) 📝 `examples/vakifbank/_payment_config.php` (+2 -1) 📝 `examples/ykb/3d/_config.php` (+1 -1) 📝 `examples/ykb/_payment_config.php` (+2 -1) 📝 `src/Entity/Card/AbstractCreditCard.php` (+5 -0) 📝 `src/Entity/Card/CreditCardEstPos.php` (+2 -2) 📝 `src/Entity/Card/CreditCardInterPos.php` (+3 -3) 📝 `src/Entity/Card/CreditCardVakifBank.php` (+4 -4) 📝 `src/Gateways/AbstractGateway.php` (+15 -13) 📝 `src/Gateways/EstPos.php` (+11 -15) 📝 `src/Gateways/GarantiPos.php` (+10 -12) 📝 `src/Gateways/InterPos.php` (+12 -14) 📝 `src/Gateways/PayForPos.php` (+9 -12) 📝 `src/Gateways/PosNet.php` (+13 -18) 📝 `src/Gateways/VakifBankPos.php` (+8 -8) 📝 `src/PosInterface.php` (+11 -6) 📝 `tests/Entity/Card/CreditCardEstPosTest.php` (+2 -1) _...and 7 more files_ </details> ### 📄 Description - added `$request` parameter to **make3DPayment()**, **make3DPayPayment()**, **make3DHostPayment(**) methods to make them more testable - **send()** method now returns response data instead of _$this_ to make it more testable. - replaced card types (visa, master) with constants. - fixed invalid URL in POSNet examples - added more unit tests for some credit card classes --- <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:52 +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#189
No description provided.