Magento2Msp icon indicating copy to clipboard operation
Magento2Msp copied to clipboard

Feature request: allow developers to add/manipulate specific data which is being send to MSP

Open hostep opened this issue 9 years ago • 4 comments

Hi guys

We have a certain client which asks us to send a custom ID they use in their own system to MSP. But I have a hard time implementing this without rewriting your code.

I was trying to change the description which gets send to MSP, by using a Plugin or even a Preference on the MultiSafepay\Connect\Model\Api\Objects\Orders::post method. But unfortunately I can't get this working, since that Orders class is just instantiated using new instead of being injected using DI.

So one option to allow us developers to manipulate this data would be to inject that Orders class using DI which would allow us to manipulate how it works. Or another - and maybe better way - would be if you dispatch a custom event just before that big array of data gets send to MSP, so we can manipulate this data using an Observer

Is this something you would be interested in?

I can create a PR for this if this should interest you?

Thanks!

hostep avatar Jan 19 '17 16:01 hostep

Hello Hostep,

If you can create a PR (for the devel branch) for it then we can look into it and also test with it.

JonkRuud avatar Jan 20 '17 07:01 JonkRuud

@JonkRuud: has this been added? I can't see anything related to this in the develop branch?

If not: can you reopen, because we still need this. I still plan on submitting a PR for this, but haven't found the time yet. It might take me a couple more weeks though ... But if anyone else feels like it, go ahead! :)

hostep avatar Mar 06 '17 14:03 hostep

@hostep Not yet, I closed this one as we didn't get any reply. I will reopen.

JonkRuud avatar Mar 06 '17 14:03 JonkRuud

As this feature request was also created internally for our backlog we will close this one. For reference, Internal request is PLGMAGTWOS-332

JonkRuud avatar Nov 09 '18 12:11 JonkRuud