kopokopo / k2-connect-php

MIT License
6 stars 24 forks source link

Error Testing with provided incoming payment Payload #7

Closed kamnjoro closed 3 years ago

kamnjoro commented 3 years ago

The example given in https://api-docs.kopokopo.com/?php#process-incoming-payment-result for the PhP version is unparsable. It is neither Json(even though header claims to be application/json) nor an array. While trying to parse it as array it leads it leads to the error " Illegal string offset" ***.

NicolletNjora commented 3 years ago

@kamnjoro, is this with version 1.1.0? There were some bugs that were reported with the first version but the latest version fixed them. Could you confirm what version of the SDK you are using?

kamnjoro commented 3 years ago

I just run composer require kopokopo/k2-connect-php afresh Cannot tell what SDK version is in use

NicolletNjora commented 3 years ago

You can check the version on the composer.json file. Also, what framework are you using?

kamnjoro commented 3 years ago

I run Codeigniter

kamnjoro commented 3 years ago

Some errors my team and I get during the testing phase are no where documented. I am able to easily get an access token. However, hitting the initiateIncomingPayment endpoint with the required options returns an empty error response shown below {"status":"error","data":{"errorCode":null,"errorMessage":null}} Here is my composer file { "require": { "kopokopo/k2-connect-php": "^1.1" } }

NicolletNjora commented 3 years ago

I am looking into this.

fabianmuema commented 3 years ago

Any solutions on this

NicolletNjora commented 3 years ago

That error occurs when a wrong base url is being used. Confirm that you are using api.kopokopo.com instead of app.kopokopo.com