ondrakoupil / csob

PHP client for ČSOB payment gateway eAPI
MIT License
44 stars 18 forks source link

Support for CSOB eAPI 1.8 #25

Closed rootpd closed 4 years ago

rootpd commented 4 years ago

In October CSOB released new version of API with support for Mall pay and Apple pay. Are you planning to bump the supported version in your library and include support for the new features?

https://github.com/csob/paymentgateway/wiki

ondrakoupil commented 4 years ago

I'll create a new version during January. It will support new endpoint, new signing, and let users call any arbitrary API method with any parameters. Facade methods for calling each API method will come later, as it is quite complicated for me to develop and test them because I do not run any e-shop anymore. If anyone creates them and sends a PR, I'll be happy to merge it.

rootpd commented 4 years ago

That's great. If you point me to the right places, I can try to make PR on my own - I maintain Omnipay wrapper that uses your library (https://github.com/rootpd/omnipay-csob) which we use in our payment process so we have a way to test it.

KubaChoice commented 4 years ago

Hi. Can you approximate: Will be necessary implement some BC breaks (Will be possible use 1.7 current code and after release 1.8 update old one without loose any functionality in 1.7 and possibly only add new features in 1.8)?

ondrakoupil commented 4 years ago

Hi, v1.8 is out now.

There are some BC breaks in bank's API (some methods were renamed, payment description in payment/init is now omitted etc.). If you use only pre-baked PHP methods in Client class, the library will handle it and send an appropriate request according to your selected API version, so no changes in application code should be necessary. If you use customRequest() method, check if everything works before updating to API 1.8.

Also note that by upgrading to 1.8 library, the GatewayUrl::PRODUCTION_LATEST and TEST_LATEST also changes to API 1.8. If you use have your Config pointed to these "latest" addresses, double check that everything works in you application.