The OneKhusaResponse Object

To make the SDK developer’s friendly, every request will have the predictable returned object, OneKhusaResponse, with the following properties:
PropertyDescription
IsSuccessThis indicates whether the action/operation is successful or not.
StatusCodeThis will contain http status code for the response such as 200 for OK
DataThis will contain response data based on the action being executed which is strongly type class. This property is set to NULL by default and when IsSuccess is set to true, this contains API endpoint data.
ErrorThis will contain RFC7807 problem-detail compliant object to provide more information about the error(s) and how the developer can recover from it, click here for more details.

This property is set to NULL by default and when IsSuccess is set to false, this contains error information.

The API Key and Secret

Whether you are using dependency injection or manual instantiation of OneKhusaClient, avoid keeping API key and secret in the system source code or source control repos to avoid leaking sensitive information. For more information, read disclaimer of OneKhusa payment gateway.