ondrakoupil / csob

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

Attempt to use oneClickInit fails due to missing required parameter #26

Closed rootpd closed 4 years ago

rootpd commented 4 years ago

Hi,

during testing of v1.8 we've found an issue when attempting to charge oneClick payment. The bank API responds with following body:

{
    "dttm": "20200212160057",
    "signature": "*REDACTED*",
    "payId": "*REDACTED*",
    "resultCode": 100,
    "resultMessage": "Missing parameter clientIp",
    "paymentStatus": 6
}

As this wasn't an issue before, we've checked why is this happening.

Currently I don't see a way how to tell the library to include clientIp to the payload of oneClickInit request. Will you be able to look at it?

Thanks!

ondrakoupil commented 4 years ago

Sure, I will look into it a.s.a.p.

rootpd commented 4 years ago

Thanks. In the meantime I'm trying to figure out why it's even there. Doesn't really make sense for offline (recurring) payments. https://github.com/csob/paymentgateway/issues/471

ondrakoupil commented 4 years ago

Please try again with 545eb8ab236ff3d9d10b35cf57e6e01c4086b11c, will it work? I added the clientIp parameter in oneclick/init method and also removed description and added merchantData parameters (which were also removed/added in API 1.8). Also I added paymentOneClickEcho method for calling oneclick/echo, which has somehow eluded me.

rootpd commented 4 years ago

Looks good, payment got through correctly on the sandbox gateway. Seems that clientIp is just for logging purposes as 127.0.0.1 went through just fine.

ondrakoupil commented 4 years ago

Thanks. Can you test it in production environment in near future so that we can be sure it really works OK? I'd tag it with new version then.

rootpd commented 4 years ago

Deployed to production, it's working.

ondrakoupil commented 4 years ago

Thanks, closing.