PHP code example of relaypay-official / merchant-php-client

1. Go to this page and download the library: Download relaypay-official/merchant-php-client library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

relaypay-official / merchant-php-client example snippets





apiInstance = new RelayPay\Api\ECommerceApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$x_api_key = 'x_api_key_example'; // string
$x_merchant_id = 'x_merchant_id_example'; // string
$order_id = 'order_id_example'; // string

try {
    $result = $apiInstance->getMerchantTransaction($x_api_key, $x_merchant_id, $order_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ECommerceApi->getMerchantTransaction: ', $e->getMessage(), PHP_EOL;
}

json
{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/relaypay-public/merchant-php-client.git"
    }
  ],
  "