Download the PHP package kassacom/php-sdk without Composer
On this page you can find all versions of the php package kassacom/php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-sdk
Kassa.com PHP SDK
Documentation: https://kassa.com/help/
Requirements
PHP 5.5 and later.
Dependencies
The bindings require the following extensions in order to work properly:
curl
, although you can use your own non-cURL client if you prefer.json
mbstring
(Multibyte String)php-fig/log
guzzlehttp/psr7
Optionally
guzzlehttp/guzzle
for use guzzle instead of cURL.
Composer
You can install the lib via Composer. Run the following command:
To use the bindings, use Composer's autoload:
If you use Composer, these dependencies should be handled automatically.
Getting Started
We recommend using the GuzzleHttp Client
Init client
All requests are processed in similar steps:
- Create request instance of
KassaCom\SDK\Model\Request\AbstractRequest
- Request serialization
- Sending a request to the server
- You have a response object instance of
KassaCom\SDK\Model\Response\AbstractResponse
or throws exception if request fail
All requests are creating by suitable objects or can be created on the basis of arrays, integers and strings
Create payment
Creating request with object
or you can create request with array
Process payment
Creating request with object
or you can create request with array
Capture payment
Creating request with object
or you can create request with token
Get payment info
Creating request with object
or you can create request with token
Cancel payment
Creating request with object
or you can create request with token
Create payout
Creating request with object
or you can create request with array
Get payout info
Creating request with object
or you can create request with array
or create by id
Payments report
Download report file
Payouts report
Download report file
Exceptions
KassaCom\SDK\Exception\TransportException
- throws in the case of an api transport error. For example, when authorization data is not provided.KassaCom\SDK\Exception\JsonParseException
- the server response doesn't contain a valid json.KassaCom\SDK\Exception\ServerResponse\ResponseException
- 4xx and 5xx server errors.KassaCom\SDK\Exception\Response\ResponseParseException
- create response errors.KassaCom\SDK\Exception\Request\RequestParseException
- create request errors.
Processing notification from server
This code is responsible for processing the payment result. You need to create handler, make it available on URL in your application and specify the URL in the project settings in kassa.com. This handler will be called after the user makes a payment using the form on kassa.com
You can use manual response to server:
If you use a proxy server, you can skip the IP check
Custom Api Transport
You can create your own api transport by extending KassaCom\SDK\Transport\AbstractApiTransport
All versions of php-sdk with dependencies
ext-curl Version *
ext-json Version *
ext-mbstring Version *
psr/log Version ^1.0|^2.0|^3.0
guzzlehttp/psr7 Version ^1.0|^2.0