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.
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.
After all the files are loaded configuration is needed. This can be done with the static methods provided in Zota class. Configuration includes:
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.
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.
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.
Classes for callbacks and redirects handling are available with the corresponding getters:
ApiCallback
MerchantRedirect
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 are available in examples
folder.
Loading and configuration:
autoload.php
loads all the needed files as bootstrap.config.php
includes main configuration.Requests:
deposit.php
- Deposit requestdeposit-cc.php
- Deposit request with Credit card detailspayout.php
- Payout requestorder-status.php
- Order status requestorders-report.php
- Orders report requestOrder Handlers:
callback.php
- API Callbackmerchant-redirect.php
- API Merchant redirectLogging:
logger.php
- DefaultLogger usageThe Zota API guide can be found on the official API Documentation pages for deposit and payout operations.
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.