[PR #214] [MERGED] Added additional data into dispatched events #257

Closed
opened 2026-03-03 15:44:11 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mewebstudio/pos/pull/214
Author: @nuryagdym
Created: 5/22/2024
Status: Merged
Merged: 5/22/2024
Merged by: @nuryagdym

Base: masterHead: refactoring-events-2


📝 Commits (7)

  • 6df2caa test - refactored gateway class unit tests
  • 45fe463 add gateway class into dispatched events
  • 42b2892 README.md added medium article link about payment models
  • 64d8b12 test - remove usages of CreditCardFactory::createForGateway from request data mappers for simplicity
  • fb51817 PosNetResponseDataMapper - fix 3d_all data is not available in response data
  • 1fe6820 add order info into dispatched events
  • 9991f16 add payment model into dispatched events

📊 Changes

56 files changed (+2170 additions, -1962 deletions)

View changed files

📝 README.md (+1 -20)
📝 docs/PRE-AUTH-POST-EXAMPLE.md (+2 -2)
📝 docs/THREED-PAYMENT-EXAMPLE.md (+4 -4)
📝 examples/_common-codes/3d/form.php (+5 -5)
📝 examples/_common-codes/regular/post-auth.php (+2 -2)
📝 examples/_templates/_finish_non_secure_payment.php (+3 -3)
📝 examples/_templates/_payment_secure_response.php (+2 -2)
📝 src/DataMapper/RequestDataMapper/AkbankPosRequestDataMapper.php (+3 -1)
📝 src/DataMapper/RequestDataMapper/EstPosRequestDataMapper.php (+8 -1)
📝 src/DataMapper/RequestDataMapper/EstV3PosRequestDataMapper.php (+8 -1)
📝 src/DataMapper/RequestDataMapper/GarantiPosRequestDataMapper.php (+8 -1)
📝 src/DataMapper/RequestDataMapper/InterPosRequestDataMapper.php (+8 -1)
📝 src/DataMapper/RequestDataMapper/PayForPosRequestDataMapper.php (+8 -1)
📝 src/DataMapper/RequestDataMapper/PosNetV1PosRequestDataMapper.php (+8 -1)
📝 src/DataMapper/ResponseDataMapper/PosNetResponseDataMapper.php (+1 -0)
📝 src/Event/Before3DFormHashCalculatedEvent.php (+21 -2)
📝 src/Event/RequestDataPreparedEvent.php (+49 -5)
📝 src/Gateways/AbstractGateway.php (+56 -7)
📝 src/Gateways/AkbankPos.php (+8 -1)
📝 src/Gateways/EstPos.php (+8 -1)

...and 36 more files

📄 Description

added additional data into dispatched events to get rid of use statements for event listeners. Ex:

$eventDispatcher->addListener(Before3DFormHashCalculatedEvent::class, function (Before3DFormHashCalculatedEvent $event) use ($pos): void {
// ....
}

also PosNet - fix 3d_all data is not available in response.


🔄 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/214 **Author:** [@nuryagdym](https://github.com/nuryagdym) **Created:** 5/22/2024 **Status:** ✅ Merged **Merged:** 5/22/2024 **Merged by:** [@nuryagdym](https://github.com/nuryagdym) **Base:** `master` ← **Head:** `refactoring-events-2` --- ### 📝 Commits (7) - [`6df2caa`](https://github.com/mewebstudio/pos/commit/6df2caaaac806f1db59c613bdaa5c85ad0d86f46) test - refactored gateway class unit tests - [`45fe463`](https://github.com/mewebstudio/pos/commit/45fe46389540df896514ca19e0e5a532e2b2ab80) add gateway class into dispatched events - [`42b2892`](https://github.com/mewebstudio/pos/commit/42b28923eece549c16fea34f06b4bc7569b25cec) README.md added medium article link about payment models - [`64d8b12`](https://github.com/mewebstudio/pos/commit/64d8b120dbb1c0e8a0f1e8656ead0b55aed71919) test - remove usages of CreditCardFactory::createForGateway from request data mappers for simplicity - [`fb51817`](https://github.com/mewebstudio/pos/commit/fb51817fe0400a89ca0318d492b459b996e1fa96) PosNetResponseDataMapper - fix 3d_all data is not available in response data - [`1fe6820`](https://github.com/mewebstudio/pos/commit/1fe6820bb072bf342350cf0eac113c92d28f28c9) add order info into dispatched events - [`9991f16`](https://github.com/mewebstudio/pos/commit/9991f16b7d054f312f14af394c1603834e175d24) add payment model into dispatched events ### 📊 Changes **56 files changed** (+2170 additions, -1962 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -20) 📝 `docs/PRE-AUTH-POST-EXAMPLE.md` (+2 -2) 📝 `docs/THREED-PAYMENT-EXAMPLE.md` (+4 -4) 📝 `examples/_common-codes/3d/form.php` (+5 -5) 📝 `examples/_common-codes/regular/post-auth.php` (+2 -2) 📝 `examples/_templates/_finish_non_secure_payment.php` (+3 -3) 📝 `examples/_templates/_payment_secure_response.php` (+2 -2) 📝 `src/DataMapper/RequestDataMapper/AkbankPosRequestDataMapper.php` (+3 -1) 📝 `src/DataMapper/RequestDataMapper/EstPosRequestDataMapper.php` (+8 -1) 📝 `src/DataMapper/RequestDataMapper/EstV3PosRequestDataMapper.php` (+8 -1) 📝 `src/DataMapper/RequestDataMapper/GarantiPosRequestDataMapper.php` (+8 -1) 📝 `src/DataMapper/RequestDataMapper/InterPosRequestDataMapper.php` (+8 -1) 📝 `src/DataMapper/RequestDataMapper/PayForPosRequestDataMapper.php` (+8 -1) 📝 `src/DataMapper/RequestDataMapper/PosNetV1PosRequestDataMapper.php` (+8 -1) 📝 `src/DataMapper/ResponseDataMapper/PosNetResponseDataMapper.php` (+1 -0) 📝 `src/Event/Before3DFormHashCalculatedEvent.php` (+21 -2) 📝 `src/Event/RequestDataPreparedEvent.php` (+49 -5) 📝 `src/Gateways/AbstractGateway.php` (+56 -7) 📝 `src/Gateways/AkbankPos.php` (+8 -1) 📝 `src/Gateways/EstPos.php` (+8 -1) _...and 36 more files_ </details> ### 📄 Description added additional data into dispatched events to get rid of **use** statements for event listeners. Ex: ```php $eventDispatcher->addListener(Before3DFormHashCalculatedEvent::class, function (Before3DFormHashCalculatedEvent $event) use ($pos): void { // .... } ``` also PosNet - fix 3d_all data is not available in response. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 15:44:11 +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#257
No description provided.