PHP Client

The PayGreen PHP SDK exposes the API features through a standardized programming interface.

Introduction

Prerequisites

PHP 5.6 and above.

Usage

First, you need to initialize the HTTP client:

$psr18Client = new Client(); // Must implement the HttpClient interface like Guzzle or curl-client

$environment = new Paygreen\Sdk\Payment\V3\Environment(
    'YOUR_SHOP_ID', // Look like this: sh_00000000000000
    'YOUR_SECRET_KEY', // Look like this: sk_00000000000000
    'SANDBOX' // Possible values : PRODUCTION, SANDBOX
);

$client = new Paygreen\Sdk\Payment\V3\Client($psr18Client, $environment);