Skip to content
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.

paylith/php-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Paylith PHP SDK

Latest Version Build Status Software License

Paylith PHP Library provides access to Paylith API from Applications written in PHP language.

Requirements

  • PHP 7.1 or higher

Installation

Composer

Install the library using Composer

$ composer require paylith/php-sdk

Use autoloader

require_once('vendor/autoload.php');

Usage

Create a Merchant link

use Paylith\Client;

$client = new Paylith\Client('TestApiKey', 'TestApiSecret');

try {
    $result = $paylith->createMerchantLink(
        'TestConversationId',
        'TestUserId',
        'TestUserEmail',
        'TestUserIpAddress',
    );
} catch (Exception $exception) {
    // catch errors
}

Create a Product link

use Paylith\Client;

$client = new Paylith\Client('TestApiKey', 'TestApiSecret');

try {
    $result = $paylith->createProductLink(
        'TestConversationId',
        'TestUserId',
        'TestUserEmail',
        'TestUserIpAddress',
        'TestProductName',
        'TestProductAmount',
    );
} catch (Exception $exception) {
    // catch errors
}

Get Payment Detail

use Paylith\Resources\Payment;

$payment = new Paylith\Resources\Payment();

try {
    $result = $payment->getDetail([
        'TestIpAddres',
        'TestPaymentId'
    ]);
} catch (Exception $exception) {
    // catch errors
}

Documentation

See the Paylith API documentation

Support

If you have any questions or issues, please contact our support at contact@paylith.com.

License

MIT license. For more information see the LICENSE file

Releases

No releases published

Packages

No packages published

Languages