phuongdev89/omnipay-voguepay

Voguepay 的 Omnipay 扩展

dev-master 2023-01-10 15:59 UTC

This package is not auto-updated.

Last update: 2024-09-18 22:38:07 UTC


README

Voguepay 的 Omnipay 扩展

安装

安装此扩展的首选方式是通过 composer

运行以下命令之一

php composer.phar require --prefer-dist phuongdev89/omnipay-voguepay "*"

或者在您的 composer.json 文件的 require 部分添加

"phuongdev89/omnipay-voguepay": "*"

使用方法

本包提供以下网关

  • Voguepay

有关通用使用说明,请参阅主 Omnipay 仓库。

示例

创建支付 URL

$gateway = Omnipay::create('Voguepay');

$gateway->initialize(array(
    'demo' => true,
    'v_merchant_id' => ''
));

$response = $gateway->payUrl([
    'total' => 10.00,
    'memo' => 'Payment description',
    'cur' => 'USD',
    'merchant_ref' => 'Your payment identity',
])->send();

if ($response->isSuccessful()) {
    $data = $response->getData(); 
}

获取交易详情

$gateway = Omnipay::create('Voguepay');

$gateway->initialize(array(
    'demo' => true,
    'v_merchant_id' => ''
));

$response = $gateway->transaction([
    'v_transaction_id' => '9GAS78ETG',
    'type' => 'json',
])->send();

if ($response->isSuccessful()) {
    $data = $response->getData(); 
}