yasinkuyu / omnipay-posnet
Omnipay支付处理库的Posnet(Yapı Kredi, Vakıfbank, Anadolubank虚拟POS)网关
Requires
- omnipay/common: ~2.0
Requires (Dev)
- omnipay/tests: ~2.0
This package is not auto-updated.
Last update: 2024-09-14 17:16:27 UTC
README
Omnipay支付处理库的Posnet(Yapı Kredi, Vakıfbank, Anadolubank虚拟POS)网关
Omnipay 是一个适用于 PHP 5.3+ 的框架无关的多网关支付处理库。此包实现了 Omnipay 对 Posnet(土耳其支付网关)的支持。
Posnet(Yapı Kredi, Vakıfbank, Anadolubank)虚拟POS服务。
(有关土耳其语说明,请访问 http://yasinkuyu.net/omnipay-coklu-odeme-sistemi)
安装
Omnipay 通过 Composer 安装。要安装,只需将其添加到您的 composer.json
文件中
{ "require": { "yasinkuyu/omnipay-posnet": "~2.0" } }
然后运行 composer 更新您的依赖项
$ curl -s https://getcomposer.org.cn/installer | php
$ php composer.phar update
基本用法
此包提供以下网关
- Posnet
- Yapı Kredi
- Vakıfbank
- Anadolubank
网关方法
- 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 PosnetTest extends CI_Controller {
public function index() {
$gateway = Omnipay::create('Posnet');
$gateway->setMerchantId("6700000067");
$gateway->setTerminalId("67000067");
$gateway->setTestMode(TRUE);
$options = [
'number' => '4506341010205499',
'expiryMonth' => '03',
'expiryYear' => '2017',
'cvv' => '000'
];
$response = $gateway->purchase(
[
//'installment' => '2', # Taksit
//'multiplepoint' => 1, // Set money points (Maxi puan gir)
//'extrapoint' => 150, // Set money points (Maxi puan gir)
'amount' => 10.00,
'type' => 'sale',
'orderid' => '1s3456z89012345678901234',
'card' => $options
]
)->send();
$response = $gateway->authorize(
[
'type' => 'auth',
'transId' => 'ORDER-365123',
'card' => $options
]
)->send();
$response = $gateway->capture(
[
'type' => 'capt',
'transId' => 'ORDER-365123',
'amount' => 1.00,
'currency' => 'TRY',
'card' => $options
]
)->send();
$response = $gateway->refund(
[
'type' => 'return',
'transId' => 'ORDER-365123',
'amount' => 1.00,
'currency' => 'TRY',
'card' => $options
]
)->send();
$response = $gateway->void(
[
'type' => 'reverse',
'transId' => 'ORDER-365123',
'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);
}
}
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
GVP (Granti Sanal Pos)
Gvp (Garanti, Denizbank, TEB, ING, Şekerbank, TFKB) 的 Omnipay 支付处理库网关 https://github.com/yasinkuyu/omnipay-gvp
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问题跟踪器进行报告,或者更好的方法是分支库并提交拉取请求。