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

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

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

pencepay/pencepay-php

最新稳定版本:v1.0.6

Composer 安装命令:

composer require pencepay/pencepay-php

包简介

Pencepay PHP Library

README 文档

README

This is a server-side library for Pencepay gateway. You can signup to Pencepay and then use this library to integrate.

Dependencies

PHP version >= 5.4 is required.

The following PHP extensions are required:

  • curl
  • dom
  • hash
  • openssl

Installation

You can install this library via Composer, by adding this to your composer.json:

{
  "require": {
    "pencepay/pencepay-php": "1.*"
  }
}

To install, run the command:

composer.phar install

If you wish to use the library without Composer, you can install it manually

git clone https://github.com/pencepay/pencepay-php

Using the Pencepay Library

If you are using Composer, include the Library in your project with:

require_once('vendor/autoload.php');

or if you are not using Composer, just require the library directly:

require_once('/path/to/pencepay-php/lib/Pencepay.php');
Pencepay_Context::setPublicKey("your-public-key");
Pencepay_Context::setSecretKey("your-secret-key");

$transaction = Pencepay_Transaction::create(
    Pencepay_Request_Transaction::build()
        ->orderId('123456')
        ->amount('10.99')
        ->currencyCode('EUR')
        ->creditCard()
            ->cardholderName('John Hancock')
            ->number('4350100010001002')
            ->cvv('313')
            ->expiryMonth(12)
            ->expiryYear(2016)
            ->done()
);

print_r($transaction);

Documentation

License

See the LICENSE file.

TODO

Upload tests.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-12-05