Skip to content

Dev Events

boxblinkracer edited this page Mar 23, 2022 · 1 revision

The Mollie plugin provides a few events that you can use to customize the behaviour of specific parts in the payment flow on your own.

Please note, all customizations in this area mean that the plugin is not working in a way that we have been able to fully test. In case of problems with the plugin, try to remove your customizations before contacting the support.

Mollie Order Build Event

This event is dispatched when the payload is being created for the request that is sent to Mollie. We allow the customization of a selected list of parameters that you can adjust. If you want to update the metadata of the Mollie order, here is an example how to do this.

public static function getSubscribedEvents()
{
    return [
        MollieOrderBuildEvent::class => 'onMollieOrderBuild'
    ];
}

public function onMollieOrderBuild(MollieOrderBuildEvent $event)
{
    $metadata = [
        'custom' => 'my-data',
    ];

    $event->setMetadata($metadata);
}
Clone this wiki locally