Closed nielstholenaar closed 8 years ago
Thanks! Came just in time
Good work. I'm not really sure what best to do and how necessary these changes are, but there is Omnipay v3 coming soon(ish). Otherwise we'd just release this version, which is breaking for existing users, and release a new one shortly after?
This could probably have been a good use-case to try the v3 API / http interface, but guess I'm a bit late to say that :/
Think the current version (of this wrapper) has been out of commission for quite a long time, I had to avoid using Omnipay because of this issue.
Do you mean the current 2.2 version is completely broken and doesn't work at all?
@barryvdh The current implementation of their API doesn't support all features. Such as recurring payments. It also uses their old XML based API, which is deprecated and not supported anymore.
I agree we may should wait, and apply the required changes to be compatible with Omnipay V3. But I don't know how long it is gone take before Omnipay V3 will be released?
@barryvdh Well I guess a working implementation is beter than a broken one. When the work is already done, what would be the harm of releasing 2 version after each other? A properly tagged version shouldn't cause any BC breaks. Thats the whole point of versioning. Just my 2 cents.
OK perhaps because this breaks BC we should actually release it as a new gateway (MultiSafePayNew or similar). In my past experience, gateways don't actually destroy old versions of their API, they just deprecate them and don't support them any more for new customers (this is the case for First Data for example). So there may be existing users who depend on the features of the now deprecated gateway rather than this new one.
In particular I note that:
Therefore I suggest that the code be restructured as follows:
There are missing docblocks. Please attend to this. Phpleague standards require "docblock all of the things". Although this has not been the case in all pre-phpleague gateway plugins for omnipay it is now a requirement. Files also require docblocks (which means you need 2 docblocks per class file, one for the file and one for the class). Again see omnipay-paypal (REST) or omnipay-firstdata for some examples.
Other than that I see no issues with the code submitted. The docblocks that are present are complete and provide the correct parameter and return definitions. I can check test coverage once the refactoring discussed above is complete.
@delatbabel Thanks for the response :+1:
I'have a look at the changes you proposed.
That would indeed be better. We can deprecate the old gateway and only use the new one in v3
I finished the implementation of the proposed changes.
LGTM
@delatbabel Comments? Otherwise I'll merge.
OK let's merge then run some tests.
See #4 for more information about this pull request.