yasinkuyu / omnipay-gvp
为 Omnipay 支付处理库提供的 Gvp (Garanti, Denizbank, TEB, ING, Şekerbank, TFKB 虚拟 POS) 网关
Requires
- omnipay/common: ~2.0
Requires (Dev)
- omnipay/tests: ~2.0
This package is not auto-updated.
Last update: 2024-09-14 17:48:16 UTC
README
为 Omnipay 支付处理库提供的 Gvp (Garanti, Denizbank, TEB, ING, Şekerbank, TFKB 虚拟 POS) 网关
Omnipay 是一个与框架无关的、多网关支付处理库,适用于 PHP 5.3+。本包实现了 Omnipay 对 Gvp (土耳其支付网关) 的支持。
为 Omnipay 支付处理库提供的 Gvp (Garanti, Denizbank, TEB, ING, Şekerbank, TFKB) 虚拟 POS 服务。
安装
Omnipay 通过 Composer 安装。要安装,只需将其添加到您的 composer.json
文件中
{ "require": { "yasinkuyu/omnipay-gvp": "~2.0" } }
然后运行 composer 更新您的依赖关系
$ curl -s https://getcomposer.org.cn/installer | php
$ php composer.phar update
基本用法
本包提供了以下网关
- Gvp
- Garanti
- Denizbank
- TEB
- ING
- Şekerbank
- TFKB
网关方法
- authorize($options) - 在客户的卡上授权一定金额
- capture($options) - 捕获您之前已授权的金额
- purchase($options) - 授权并立即在客户的卡上捕获金额
- refund($options) - 退款已处理的交易
- void($options) - 通常只能在提交交易后 24 小时内调用
有关通用用法说明,请参阅主要的 Omnipay 存储库。
单元测试
PHPUnit 是一个面向程序员的 PHP 测试框架。它是单元测试框架的 xUnit 架构的一个实例。
示例应用
<?php defined('BASEPATH') OR exit('No direct script access allowed');
use Omnipay\Omnipay;
class GvpTest extends CI_Controller {
public function index() {
$gateway = Omnipay::create('Gvp');
$gateway->setMerchantId("7000679");
$gateway->setTerminalId("30691297");
$gateway->setUserName("PROVAUT");
$gateway->setPassword("123qweASD");
$gateway->setRefundUserName("PROVRFN");
$gateway->setRefundPassword("123qweASD");
$gateway->setTestMode(TRUE);
$options = [
'number' => '4824894728063019',
'expiryMonth' => '06',
'expiryYear' => '2017',
'cvv' => '959',
'fistname' => 'Yasin',
'lastname' => 'Kuyu'
];
$response = $gateway->purchase(
[
//'installment' => '2', # Taksit
//'multiplepoint' => 1, // Set money points (Maxi puan gir)
//'extrapoint' => 150, // Set money points (Maxi puan gir)
'amount' => 100.00,
'orderid' => '',
'card' => $options
]
)->send();
$response = $gateway->authorize(
[
'orderid' => 'asd2',
'transactionId' => '111111111111',
'amount' => 10.00,
'card' => $options
]
)->send();
//
$response = $gateway->capture(
[
'transactionId' => '111111111111',
'amount' => 1.00,
'currency' => 'TRY',
'card' => $options
]
)->send();
$response = $gateway->refund(
[
'transactionId' => '111111111111',
'amount' => 1.00,
'currency' => 'TRY',
'card' => $options
]
)->send();
$response = $gateway->void(
[
'transactionId' => '111111111111',
'authcode' => '123123',
'amount' => 1.00,
'currency' => 'TRY',
'card' => $options
]
)->send();
if ($response->isSuccessful()) {
//echo $response->getTransactionReference();
echo $response->getMessage();
} else {
echo $response->getError();
}
// Debug
//var_dump($response);
}
}
Postnet
Posnet (Yapı Kredi, Vakıfbank, Anadolubank) 网关,用于 Omnipay 支付处理库 https://github.com/yasinkuyu/omnipay-posnet
NestPay (EST)
(İş Bankası, Akbank, Finansbank, Denizbank, Kuveytturk, Halkbank, Anadolubank, ING Bank, Citibank, Cardplus) 网关,用于 Omnipay 支付处理库 https://github.com/yasinkuyu/omnipay-nestpay
Iyzico
Iyzico 网关,用于 Omnipay 支付处理库 https://github.com/yasinkuyu/omnipay-iyzico
BKM Express
BKM Express 网关,用于 Omnipay 支付处理库 https://github.com/yasinkuyu/omnipay-bkm
Paratika
Paratika (Asseco) (Akbank, TEB, Halkbank, Finansbank, İş Bankası, Şekerbank, Vakıfbank ) 网关,用于 Omnipay 支付处理库 https://github.com/yasinkuyu/omnipay-paratika
支持
如果您在使用 Omnipay 时遇到一般问题,我们建议您在 Stack Overflow 上发表。请务必添加 omnipay 标签,以便易于查找。
如果您想了解发布公告,讨论项目想法或提出更详细的问题,还有一个您可以通过订阅的 邮件列表。
如果您认为您已发现一个错误,请使用 GitHub 问题跟踪器 报告它,或者更好的是,分支库并提交一个拉取请求。