- Issue created by @mhawwari
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 8:52am 3 July 2023 - last update
over 1 year ago 785 pass - 🇮🇱Israel jsacksick
While I agree with the first change, I'm not sure about the second one:
The onPaid() method checks if the payment gateway is an instance of OffsitePaymentGatewayInterface while it is possible for a gateway to implement SupportsNotificationsInterface without being an offsite payment gateway.
The reason being that for non offsite gateways, you technically remain on the site, and completing checkout should place the order.
- 🇯🇴Jordan mhawwari
The reason being that for non offsite gateways, you technically remain on the site, and completing checkout should place the order.
In our specific case, we have a new payment gateway that inherits the stripe onsite payment gateway to create intents and handle the checkout process as an onsite payment with the addition of an onNotify() method to listen to a webhook for the payment resolution from stripe to complete/cancel the payment since it takes a few days to be confirmed.
It is possible to make this into an offsitePaymentGateway but there will be no need for any of the methods that the interface provides.
- 🇯🇴Jordan mhawwari
I understand this is not the conventional use of SupportsNotificationsInterface so the question here would be if SupportsNotificationsInterface should be allowed to be implemented separately from offsitePaymentGatewayInterface if it provides an endpoint that can be utilized with gateway webhooks. Or should a payment gateway always be considered an offsite gateway to integrate notifications.