eusonlito/braintree_php 问题修复 & 功能扩展

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

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

eusonlito/braintree_php

最新稳定版本:3.5.0

Composer 安装命令:

composer require eusonlito/braintree_php

包简介

Braintree PHP Client Library

README 文档

README

The Braintree PHP library provides integration access to the Braintree Gateway. Updated original to support Namespaces and PSR-4 load.

Dependencies

PHP version >= 5.4.0 is required.

The following PHP extensions are required:

  • curl
  • dom
  • hash
  • openssl
  • xmlwriter

Composer install

"eusonlito/braintree_php" : "dev-master"

Quick Start Example

<?php

require_once '/braintree/folder/src/autoload.php';

Braintree\Configuration::reset();
Braintree\Configuration::environment('sandbox');
Braintree\Configuration::merchantId('your_merchant_id');
Braintree\Configuration::publicKey('your_public_key');
Braintree\Configuration::privateKey('your_private_key');

$result = Braintree\Transaction::sale(array(
    'amount' => '1000.00',
    'creditCard' => array(
        'number' => '5105105105105100',
        'expirationDate' => '05/12'
    )
));

if ($result->success) {
    print_r("success!: " . $result->transaction->id);
} else if ($result->transaction) {
    print_r("Error processing transaction:");
    print_r("\n  code: " . $result->transaction->processorResponseCode);
    print_r("\n  text: " . $result->transaction->processorResponseText);
} else {
    print_r("Validation errors: \n");
    print_r($result->errors->deepAll());
}

?>

HHVM Support

The Braintree PHP library will run on HHVM >= 3.4.2.

Legacy PHP Support

Version 2.40.0 is compatible with PHP 5.2 and 5.3. You can find it on our releases page.

Documentation

Open Source Attribution

A list of open source projects that help power Braintree can be found here.

License

See the LICENSE file.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-20