zota / php-sdk

PHP SDK for the Zota Merchant API
https://developers.zota.com
Apache License 2.0
1 stars 3 forks source link

codecov PHP Quicktest SDK CI Matrix Build PHP PSR Enforcer

php-sdk

Official Zota PHP SDK

This is the official page of the Zota PHP SDK. It is intended to be used by developers who run modern PHP applications and would like to integrate our next-generation payments platform.

Introduction

PHP SDK provides all the neccessary methods for integrating the Zota Merchant API. This SDK is used by clients, as well as all the related eCommerce plugins for mainstream PHP applications.

Requirements

Usage

Main configuration

After all the files are loaded configuration is needed. This can be done with the static methods provided in Zota class. Configuration includes:

API requests

After everything is setup all requests to the API are made with the corresponding classes:

Every request class consist of public request method with data object parameter. There are also private methods for preparation of the data and the signature.

Making the request

First the data object has to be created and all the needed data setup with the setters (ex. DepositOrder).

After that the request class (ex. Deposit) is created and the request method is called with the data object as parameter.

Retrieving the response

Every request method returns response object with available getters. In every response object are included getters providing the code, the message and the data as they are received from the API. Also in every response object are included getters for the body of the response, the HTTP code and the JSON. All other getters are request-specific and are available for easier usage of the response further.

Callback and Merchant redirect handlers

Classes for callbacks and redirects handling are available with the corresponding getters:

Additional resources

In addition DefaultLogger class is available for logging. The DefaultLogger includes eight methods for writing logs to the eight RFC 5424 levels (debug, info, notice, warning, error, critical, alert, emergency).

Examples

Examples are available in examples folder.

Loading and configuration:

Requests:

Order Handlers:

Logging:

Resources

The Zota API guide can be found on the official API Documentation pages for deposit and payout operations.

Support

This SDK is supported and maintaned by Zota. For sign-up and sales inquiries, please contact sales@zota.com. For Support, please use support@zota.com and include customer identifiable information, along with a description of the issue.