定制 agile-pay/sdk 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

agile-pay/sdk

Composer 安装命令:

composer require agile-pay/sdk

包简介

README 文档

README

Code climate

Install

$ composer require agile-pay/sdk

Usage

$agilePay = new \AgilePay\Sdk\AgilePay([
    'api_key' => '',
    'api_secret' => ''
]);

Gateways

To create a new gateway :

$gateway = $agilePay->gateway()->create('stripe', [
    'secret_key' => ''
]);

The response will contain a gateway reference which is used to perform transactions against the gateway

$gateway->reference;

Payment methods

To create a new payment method type of gateway token:

In this case the payment method will be retained with the provided gateway, please check the availability of transaction store in the gateways

Gateways list -> http://docs.agilepay.io/#!/gateway

Gateway token -> http://docs.agilepay.io/#!/payment-method-create-gateway-token

$paymentMethod = $agilePay->paymentMethod()->createGatewayToken($gateway->reference, [
    'number' => '',
    'holder_name' => '',
    'cvv' => '',
    'expiry_month' => '', //mm
    'expiry_year' => '',  //yy
]);

The response will contain a payment method token which is used to perform transactions against the payment method

$paymentMethod->token;

Transactions

Auth (Charge a credit card with a payment method type of gateway token):

$transaction = $agilePay->transaction()
                ->setPaymentMethod($paymentMethod->token;)
                ->auth(500, 'eur'); //Charging 5.00 euros

The response will contain a reference which can be used for second steps transactions such as void, capture and refund

$transaction->reference;

Void (Cancel an authorized transaction):

$response = $agilePay->transaction($transaction->reference)->void();

Capture (Settle an authorized transaction):

$response = $agilePay->transaction($transaction->reference)->capture();

Credit (Refund a settled transaction):

$response = $agilePay->transaction($transaction->reference)->credit();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-08-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固