PHP Classes

PayDirectly PHP: Send HTTP requests to the PayDirectly API

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 36 All time: 11,013 This week: 206Up
Version License PHP version Categories
paydirectly-php 1.0.0Custom (specified...5PHP 5, Web services, Finances
Description 

Author

This package can send HTTP requests to the PayDirectly API.

It provides several classes that can send HTTP requests to the PayDirectly API using Curl or the Guzzle package.

The package can compose the HTTP requests to set the necessary headers to set API tokens. It can also retrieve the request responses and decode them before returning the response to the application.

Picture of Asad Ali
Name: Asad Ali <contact>
Classes: 1 package by
Country: Pakistan Pakistan

 

Example

<?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;
}
?>


Details

<p align="center">

</p>

Paydirectly SDK for PHP

PHP library for paydirectly API.

Installation

The recommended way to install paydirectly-php is through Composer:

composer require paydirectly/paydirectly-php

After installing, you need to require Composer's autoloader:

require 'vendor/autoload.php';

Quickstart

All configs are passed around as a single variable config:

$paydirectly = new \paydirectly\paydirectly([
    'merchant_id' => 'id_ ...',
    'secret_key' => 'sk_live_ ...',
]);

Documentation

Fantastic documentation is available at https://php.paydirectly.io.


  Files folder image Files (196)  
File Role Description
Files folder image.circleci (1 file)
Files folder imagesrc (1 file, 3 directories)
Files folder imagestorage (1 file)
Files folder image_tests (3 files, 1 directory)
Accessible without login Plain text file buildspec.yml Data Auxiliary data
Accessible without login Plain text file CHANGES.rst Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file package.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:36
This week:0
All time:11,013
This week:206Up