tanjarlan / omnipay-cmbpay
Cmb gateway for Omnipay payment processing library
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/tanjarlan/omnipay-cmbpay
Requires
Requires (Dev)
- omnipay/tests: ^3.0
This package is auto-updated.
Last update: 2025-10-16 11:32:37 UTC
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();