Skip to content
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

MollieOrderBuildEvent question #342

Open
BranDavidSebastian opened this issue Apr 25, 2022 · 1 comment
Open

MollieOrderBuildEvent question #342

BranDavidSebastian opened this issue Apr 25, 2022 · 1 comment
Labels
Feature Request New feature or request Question / Issue Further information is requested

Comments

@BranDavidSebastian
Copy link

First, thank you for all the amazing work!

I am trying to implement a plugin that adds the split payment functionality ( https://docs.mollie.com/connect/splitting-payments ) from outside. I tried to study my possibilities and thought I had a change with MollieOrderBuildEvent but it ended up it doesn't have a setter for the orderData  so I can modify the API call according to the documentation. The obvious solution is to fork this and just add a setter to the class and everything will work (which I did), but before going on with this (and losing all the updates and possible features and making the maintenance really hard), I would like to kindly ask you if there is another solution for this which I am missing, I am sure no one knows your code better, so if you can advice me, I will appreciate it. If there is no easy way, just forking this will still be good, but I am trying to make my work easier in the future, so that's why I am asking this.

Thanks in advance.

@boxblinkracer
Copy link
Collaborator

Hi @BranDavidSebastian

thank you for your message

so there's actually a reason why this is not (yet) possible.
we have to ensure that (at least in standard) everything works as expected..its payment you know :)
this event is in fact the first one to officially support changing order data from a 3rd party plugin.
we just wanted to start with the medata.
changing the real order and line item data has pro's and con's
...still...there are changes that it really comes and this event will be extended

i think it would indeed be the best idea to create a setter in this like you said. would be the best way to still make it possible to update it.
maybe just add a unit test in your project and check if that file still contains your changes lin line xzy,
then you can update the plugin and will automatically see that you need to add your changes there again, because of the broken test

if you have a good and are happy with it, maybe you can even create something like a proposal pull request?
I'd be open and would verify the risk internally to see if we can merge it

thanks for your work

@boxblinkracer boxblinkracer added Feature Request New feature or request Question / Issue Further information is requested labels Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request Question / Issue Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants