Skip to content

payutc/php-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 

Repository files navigation

php-client

A PHP client for the payutc server.

Install

If you are not using the Composer dependency manager in your project, download it :

$ curl -sS https://getcomposer.org/installer | php

Then, create (or edit) the composer.json file :

{
    "require": {
        "payutc/php-client": "*"
    }
}

Now, run Composer to download the dependency :

$ php composer.phar install

Usage

Here is an example of using the AutoJsonClient, which allows you to call any method dynamically.

<?php

require_once "vendor/autoload.php";

use \Payutc\Client\AutoJsonClient;
use \Payutc\Client\JsonException;

$c = new AutoJsonClient("http://localhost/payutc/server/", "MYACCOUNT");

$result = $c->getCasUrl();
var_dump($result);

try {
	$result = $c->loginCas(array(
        "ticket" => "CAS-TICKET-42",
        "service" => "http://localhost/payutc/casper/"
    ));
    var_dump($result);
}
catch (JsonException $e) {
	echo $e.PHP_EOL;
}

About

A PHP client for the payutc server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages