thephpleague / omnipay-common

Core components for the Omnipay PHP payment processing library
MIT License
329 stars 242 forks source link

Add Support for Notifications that passes a TransactionId #257

Closed GrzegorzBandur closed 2 years ago

GrzegorzBandur commented 2 years ago

Add Support for Notifications that passes a TransactionId.

barryvdh commented 2 years ago

This is up to the gateway to implement.

GrzegorzBandur commented 2 years ago

This is up to the gateway to implement.

Yes I want to implement this in gateway and check's if gateway has implement this method in multigateway case.

barryvdh commented 2 years ago

Yeah but adding it to the interface gives the impression that the method is always available.

GrzegorzBandur commented 2 years ago

Yeah but adding it to the interface gives the impression that the method is always available.

Maybe the solution is to add second interface that extends this interface and check's if Notification implements it? A lot of providers has this information in Notification and It will be good to get it.

barryvdh commented 2 years ago

Yeah but you can still check if the method exists or the data is available. Adding an interface is cleaner but would require all gateways to update.

GrzegorzBandur commented 2 years ago

I think that if there is no interface for that nobody will implement method which returns transactionId. If this will be an additional interface that's extends NotificationInterface there will not necessary to update gateways and I future it is possible that getTransactionId in Notification class will be available in gateways published on the internet.