payrex/payrex-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

payrex/payrex-php

最新稳定版本:v1.8.2

Composer 安装命令:

composer require payrex/payrex-php

包简介

PayRex PHP Library

README 文档

README

PayRex PHP library provides PHP applications an easy access to the PayRex API. Explore various PHP classes that represents PayRex API resources on object instantiation.

Check example.php see usage examples.

Requirements

PHP 5.6.0 and later.

Composer

You can install the library via Composer. Run the following command:

composer require payrex/payrex-php

To use the bindings, use Composer's autoload:

require_once('vendor/autoload.php');

Manual Installation

If you prefer to manually install the library instead of using composer, you can download the latest release. Then, to use the bindings, include the initialize.php file.

require_once('/path/to/payrex-php/initialize.php');

Dependencies

The bindings require the following extensions in order to work properly:

If you use Composer, these dependencies should be handled automatically. If you install manually, you'll want to make sure that the required extensions are available.

Getting Started

Simple usage looks like:

$client = new \Payrex\PayrexClient('Your PayRex secret api key');
$paymentIntent = $client->paymentIntents->create([
    'amount' => 10000,
    'currency' => 'PHP',
    'payment_methods' => ['card']
]);

echo $paymentIntent->id;

Handle errors

try {
    $client = new \Payrex\PayrexClient('Your PayRex secret api key');
    $paymentIntent = $client->paymentIntents->create([
        'amount' => 10000,
        'currency' => 'PHP',
        'payment_methods' => ['card']
    ]);
} catch(\Payrex\Exceptions\InvalidRequestException $e) {
   print "<pre>";
   print_r($e->getError());
   print "</pre>";
}

统计信息

  • 总下载量: 20.9k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 未知