Closed MatthiasBrodelet closed 1 month ago
Hi @MatthiasBrodelet
Thank you for your feedback.
We have just released version 4.2.0
of the commerce-omnipay
library which this plugin uses.
In that release we have included a new event EVENT_BUILD_GATEWAY_REQUEST
. This falls in line with other gateway plugin and gives developers the opportunity to modify the request data that will be sent to the payment provider.
You should be able to run composer update
in your project to get the latest version of the library.
With that you will be able to adjust your code as follows:
Event::on(
\craft\commerce\omnipay\base\Gateway::class,
\craft\commerce\omnipay\base\Gateway::EVENT_BUILD_GATEWAY_REQUEST,
function(\craft\commerce\omnipay\events\BuildGatewayRequestEvent $event) {
$event->request['expiresAt'] = "2024-09-28T09:28:37+00:00";
}
);
Hope this helps, thanks!
I want to change the default expire time of the SEPA bank transfers. By default this is 14 days. (https://docs.mollie.com/docs/bank-transfer)
Mollie has a property with which you can set the expire date for the payment called
expiresAt
. (https://docs.mollie.com/reference/create-payment) Unfortunately it does not seem like this plugin lets me edit this property.I found the
EVENT_BEFORE_SEND_PAYMENT_REQUEST
event in the omnipay plugin which I used to do the following.However this does not work. The
description
property is editable but not theexpiresAt
property. Can this be added please?