PHP code example of maviance / smobilpay-php

1. Go to this page and download the library: Download maviance/smobilpay-php 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/ */

    

maviance / smobilpay-php example snippets



nject credentials
$token = "public access key";
$secret = "access secret";
$url = "https://XXXXX";

$xApiVersion = "3.0.0"; // string | api version info

// init
$config = new \Maviance\S3PApiClient\Configuration();
$config->setHost($url);
$client = new \Maviance\S3PApiClient\ApiClient($token, $secret, ['verify' => false]);

// trigger request
$apiInstance = new Maviance\S3PApiClient\Service\AccountApi($client, $config);

try {
    $result = $apiInstance->accountGet($xApiVersion);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->accountGet: ', $e->getMessage(), PHP_EOL;
}
json
{
  "iance/smobilpay-php": "*"
  }
}