bamboopayment/bamboopayment-sdk 问题修复 & 功能扩展

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

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

bamboopayment/bamboopayment-sdk

Composer 安装命令:

composer require bamboopayment/bamboopayment-sdk

包简介

PHP SDK to interact with BambooPayment PCI API

README 文档

README

Latest Version on Packagist Software License Build Status Coverage Status Total Downloads

System Requirements

You need PHP >= 7.4

Dependencies

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

  • json (This extension implements the » JavaScript Object Notation (JSON) data-interchange format.)
  • guzzle (Guzzle is a PHP HTTP client to send HTTP requests and to integrate with web services.)
  • generated-hydrator (GeneratedHydrator is a library about high performance transition of data from arrays to objects and from objects to arrays.)

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

Documentation

Full documentation: Spanish, English, Portuguese.

Installation

Composer

To install with Composer, simply run the following command:

composer require bamboopayment/bamboopayment-sdk

Or you can manually add the requirement to your composer.json file:

{
  "require" : {
    "bamboopayment/bamboopayment-sdk" : "0.1.*"
  }
}

Then install by running

composer.phar install

Manual installation

Obtain the latest version of BambooPayment SDK with:

git clone https://github.com/BambooPayment/sdk_php.git

Getting started

If you are using Composer use autoload functionality:

include "vendor/autoload.php";

Usage

Creating a customer

File with working example: examples/customers/create.php

To create an order using REST API in back-end you must provide an Array with customer data:

in your controller

    $bambooPaymentClient = new BambooPaymentClient(
        [
            'api_key' => PRIVATE_KEY,
            'testing' => true,
        ]
    );

    $customer = $bambooPaymentClient->customers->create(
        [
            'Email'          => 'testing@bamboopayment.com',
            'FirstName'      => 'PrimerNombre',
            'LastName'       => 'PrimerApellido',
            'DocNumber'      => 12345672,
            'DocumentTypeId' => 2,
            'PhoneNumber'    => '24022330',
            'BillingAddress' => [
                'AddressType'   => 1,
                'Country'       => 'UY',
                'State'         => 'Montevideo',
                'City'          => 'MONTEVIDEO',
                'AddressDetail' => '10000'
            ]
        ]
    );

Creating a purchase

File with working example: examples/purchases/create.php

To create an order using REST API in back-end you must provide an Array with purchase data:

in your controller

    $bambooPaymentClient = new BambooPaymentClient(
        [
            'api_key' => PRIVATE_KEY,
            'testing' => true,
        ]
    );

    $purchase = $bambooPaymentClient->purchases->create(
        [
            'TrxToken'     => 'OT__klLNXDDkgAvk1KXG-i6SIUxo-ACnvpjf4jiYpVJ8SzQ_',
            'Order'        => '12345678',
            'Amount'       => 100,
            'Installments' => 1,
            'Customer'     => [
                'Email'          => 'juanperez123@bamboopayment.com',
                'FirstName'      => 'Juan',
                'LastName'       => 'Perez',
                'PhoneNumber'    => '099123123',
                'DocNumber'      => '12345672',
                'DocumentTypeId' => 2,
                'BillingAddress' => [
                    'AddressType'   => 1,
                    'Country'       => 'Uruguay',
                    'State'         => 'Montevideo',
                    'City'          => 'MONTEVIDEO',
                    'AddressDetail' => 'Av. Sarmiento 2260'
                ]
            ],
            'DataUY'       => [
                'IsFinalConsumer' => 'true',
                'Invoice'         => '1000',
                'TaxableAmount'   => 100
            ],
            'Currency'     => 'UYU',
            'Capture'      => 'true'
        ]
    );

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes using the Angular Contributing Guide (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Run composer test to test your code (composer test)
  6. Create new Pull Request

Support

For support, email soportetec@bamboopayment.com

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-04-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固