Implement SupportsNotificationsInterface

Created on 22 May 2023, over 1 year ago
Updated 8 August 2023, over 1 year ago

Problem/Motivation

The webhook is implemented in a custom controller. There is already a mechanism for webhooks implemented by comerce PaymentNotificationController.

Proposed resolution

The PostFinanceCheckoutInterface can extend SupportsNotificationsInterface and the code from WebhookController can be moved to the PostFinanceCheckout implementation.

To keep the URL unchanged, the routing can point to commerce_payment.notify with a default value for commerce_payment_gateway

Remaining tasks

User interface changes

None.

API changes

Existing customization relying on WebhookController would need to change to PostFinanceCheckoutInterface anymore.

Data model changes

Feature request
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @coffeemakr
  • 🇨🇭Switzerland berdir Switzerland

    No, this doesn't work. We implemented it separately on purpose. Using the commerce interface requires that you can control the notify URL and that it includes the gateway, that's not the case here. You can't just "include a default value", figuring this out is exactly the purpose of the custom controller.

    It's also not just about the built-in transaction notification, there are events that are not directly tied to a transaction/order.

  • Status changed to Closed: works as designed over 1 year ago
  • Thank you for the explanation, my bad!

Production build 0.71.5 2024