-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to set description #29
Comments
+1 |
Hi team, is this feature on the roadmap for implementing? Our client would love to have better references to the invoices generated in Craft Commerce in Mollie. |
Hi All This is actually already possible using events from the underlying Commerce Ominpay library. You can achieve this with the following code: Event::on(
\craft\commerce\omnipay\base\Gateway::class,
\craft\commerce\omnipay\base\Gateway::EVENT_BEFORE_SEND_PAYMENT_REQUEST,
function(SendPaymentRequestEvent $event) {
$event->modifiedRequestData = $event->requestData;
$event->modifiedRequestData['description'] = 'My Custom Description';
}
); Obviously you will probably want to expand the code there to do some more checks but this should get you on the right track. Thanks! |
Ok, I get that it is possible when writing a module and extending the plugin. But wouldn't it be nice to have a pretty basic feature built in? Seems like the only thing the module would do is actually add a "description" variable. It would make more sense to me to be able to set this value with a form field, just like you can set all other variables with form fields. |
Hi @bartrylant We can certainly see that setting a That is not to say that it would be an issue to put in place but it would need some consideration and updates to a few files. There may also be other things currently, or in the future, that would need to be added in a similar vein to We are evaluating payment gateways and how developers use the We will keep this issue open as it is a valid point and therefore could become a feature. For the moment, we believe the above solution is a valid way of achieving the goal. Thank you for your input it is very much appreciated. Thanks. |
Description
In Mollie, every order has a description. Craft automatically sets the description to "Order #xxxxxxxxx"
According to the Mollie API docs, you could use a field called description, and set the description to whatever you want. E.g.
However, ik looks like that value (when I put in in the last form on the website, the form that posts to commerce/payments/pay), doesn't get sent to Mollie.
The text was updated successfully, but these errors were encountered: