inarli/payu-tools

PayU 官方库中不包含的基本功能

0.1.3 2017-08-24 08:24 UTC

This package is auto-updated.

Last update: 2024-09-29 00:18:25 UTC


README

PayU PHP 客户端

Build Status

您可以使用此库向 PayU Rest API 发送请求;

示例:

<?php
require_once '../vendor/autoload.php';
    $merchant = new \PayuTools\Merchant('OPU_TEST', 'SECRET_KEY');
    $client = new \PayuTools\Client($merchant);
    $cancelRequest = new \PayuTools\Request\Token\CancelRequest('5213b33bad3c07e87e8f032c94452bdc', 'Token cancelled');
    $response = $client->send($cancelRequest);
    var_dump($response->getStatus());
    var_dump($response->getError());
    var_dump($response->getData());
?>