PHP Classes

File: _tests/TestPaydirectly.php

Recommend this page to a friend!
  Classes of Asad Ali  >  PayDirectly PHP  >  _tests/TestPaydirectly.php  >  Download  
File: _tests/TestPaydirectly.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PayDirectly PHP
Send HTTP requests to the PayDirectly API
Author: By
Last change:
Date: 2 months ago
Size: 710 bytes
 

Contents

Class file image Download
<?php
error_reporting
(1);
ini_set('display_errors', 1);
require
'vendor/autoload.php';
use
Paydirectly\Exceptions\RESTfulException;

$params = [

]
try {
   
$paydirectly = new \Paydirectly\Paydirectly(
array(
 
'merchant_id'=>'HyuNMmX9cThGm5tRGz1JMZSG7DCDjd',
 
'secret_key'=>
 
'WUdtL0cxMFcwTjlHZVpHOWxNQlB3MmozU25DRzF2ZDZkUmkwUjdtNzFBSkdMdWVKc0JMYldqNDM5OGtobG9NcGRrcThDWG1wTWxob0doMVlEdnFCL0hBQWUreHpHNUlOVGt3UGN0dlVFZHlpNVZqZWRwTDhySVJOdnNuNmNKVjQ=',
 
'client_handler'=>'guzzle'
));
   
 
$response = $paydirectly->post('orders/create-checkout', $params);
 
print_r($response);
} catch (
RESTfulException $e) {
   echo
$e->getErrorCode();
   echo
$e->getMessage();
   echo
$e->getErrorList();
   exit;
}
?>

For more information send a message to info at phpclasses dot org.