adee2210 / omnitest

Omnipay 支付网关

dev-master 2015-05-30 12:01 UTC

This package is not auto-updated.

Last update: 2024-10-02 08:58:27 UTC


README

网关操作

ccPurchase 元素

安装

composer require adee2210/omnitest:dev-master

如何使用

步骤 1 : 初始化

$gateway = new Adee2210\Omnitest\Gateway;

步骤 2 : 调用网关操作(例如 ccPurchase)

$args = $gateway->getConfig(array('run' => 'ccPurchase'));

步骤 3 : 获取所有操作字段

$Fields = $args['args'];
$OptionalField = $args['optional'];

步骤 4 : 发送变量或获取网关结果

$response = $gateway->postForm('ccPurchase', $app['request']->request->all());

响应

成功

[ { "mxsid": "10146", "payby": "bpay", "title": "BPay", "display_title": null, "description": null, "transfertime": null, "transferlimit": null, "currency_code": "AUD", "currency_symbol": "$", "image": "--Logo URL--", "fee": { "srccode": "AUD", "destcode": "USD", "rate": 0.96801106010318, "effectivedate": "2011-04-04",  "flatfee": 3, "mdr": 1 }, "fields": { "card_no": { "description": "", "type": "hidden", "value": "70720297711", "title": "" }, "description": { "description": "", "type": "span", "value": "--HTML String--" }, } }]

失败

{"status":"EXC","msg":"Some error message here"}