tanjarlan/omnipay-cmbpay 问题修复 & 功能扩展

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

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

tanjarlan/omnipay-cmbpay

Composer 安装命令:

composer require tanjarlan/omnipay-cmbpay

包简介

Cmb gateway for Omnipay payment processing library

README 文档

README

CmbPay driver for the Omnipay PHP payment processing library

Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.3+. This package implements WechatPay support for Omnipay.

Installation

Omnipay is installed via Composer. To install:

composer require tanjarlan/omnipay-cmbpay

Basic Usage

The following gateways are provided by this package:

  • CmbPay_H5 (Cmb H5 Gateway) 招行支付H5网关
  • Coming soon...

Usage

Create Order doc

//gateways: CmbPay_H5, ...
$gateway    = Omnipay::create('CmbPay_H5');
$gateway->setBranchNo($config['branchNo']);
$gateway->setMerchantNo($config['merchantNo']);
$gateway->setMerchantKey($config['merchantKey']);

$order = [
    'orderNo' => '202104011000000002',
    'amount' => '0.01'
];

$request  = $gateway->purchase($order);
$response = $request->send();

if ($response->isSuccessful()) {
    return $response->redirect();
} else {
    return $response->getMessage();
}

Refund doc

$response = $gateway->refund([
    'orderNo' => '202104011000000002',
    'amount' => '0.01',
    'refundSerialNo' => 'RFD0002'
])->send();

if ($response->isSuccessful()) {
    return 'refund success';
}

return $response->getMessage();

统计信息

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

GitHub 信息

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

其他信息

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