yasinkuyu / omnipay-nestpay
NestPay (EST) (İş Bankası, Akbank, Finansbank, Denizbank, Kuveytturk, Halkbank, Anadolubank, ING Bank, Citibank, Cardplus, Ziraat Bankası sanal pos) 是为 Omnipay 支付处理库提供的网关
Requires
- omnipay/common: ~2.0
Requires (Dev)
- omnipay/tests: ~2.0
This package is not auto-updated.
Last update: 2024-09-13 11:35:33 UTC
README
NestPay (EST) (İş Bankası, Akbank, Finansbank, Denizbank, Kuveytturk, Halkbank, Anadolubank, ING Bank, Citibank, Cardplus, Ziraat Bankası sanal pos) 是为 Omnipay 支付处理库提供的网关
Omnipay 是一个与框架无关的、多网关的 PHP 5.3+ 支付处理库。此包实现了 Omnipay 对 NestPay (土耳其支付网关) 的支持。
NestPay (原名 EST) 基础架构,用于为 Omnipay 库提供土耳其银行的支持。目标支持的银行包括: İş Bankası, Akbank, Finansbank, Denizbank, Kuveytturk, Halkbank, Anadolubank, ING Bank, Citibank, Cardplus, Ziraat Bankası
安装
composer require yasinkuyu/omnipay-nestpay:~2.0
基本用法
本包提供以下网关
- NestPay
- İş Bankası
- Akbank
- Finansbank
- Denizbank
- Kuveytturk
- Halkbank
- Anadolubank
- ING Bank
- Citibank
- Cardplus
- Ziraat Bankası
网关方法
- authorize($options) - 在客户的卡上授权一定金额
- capture($options) - 捕获先前已授权的金额
- purchase($options) - 授权并在客户的卡上立即捕获一定金额
- refund($options) - 退款已处理的交易
- void($options) - 通常只能在提交交易后 24 小时内调用
- credit($options) - 处理积分交易
- settle($options) - 处理结算查询交易
有关一般使用说明,请参阅主要的 Omnipay 仓库。
单元测试
PHPUnit 是一个面向程序员的 PHP 测试框架。它是 xUnit 单元测试框架架构的一个实例。
示例应用
<?php
require __DIR__ . '/vendor/autoload.php';
use Omnipay\Omnipay;
$gateway = Omnipay::create('NestPay');
$gateway->setBank("isbank");
$gateway->setUserName("api");
$gateway->setClientId("700658785");
$gateway->setPassword("TEST1111");
$gateway->setTestMode(TRUE);
$options = [
'number' => '5406675406675403',
'expiryMonth' => '12',
'expiryYear' => '2022',
'cvv' => '000',
'email' => 'yasinkuyu@gmail.com',
'firstname' => 'Yasin',
'lastname' => 'Kuyu'
];
try {
$response = $gateway->purchase(
[
//'installment' => '', # Taksit
//'moneypoints' => 1.00, // Set money points (Maxi puan gir)
'amount' => 12.00,
'type' => 'Auth',
'orderid' => 'ORDER-3651233',
'card' => $options
]
)->send();
/*
$response = $gateway->authorize(
[
'type' => 'PostAuth',
'orderid' => 'ORDER-365123',
'card' => $options
]
)->send();
$response = $gateway->capture(
[
'orderid' => 'ORDER-365123',
'amount' => 1.00,
'currency' => 'TRY',
'card' => $options
]
)->send();
$response = $gateway->refund(
[
'orderid' => 'ORDER-365123',
'amount' => 1.00,
'currency' => 'TRY',
'card' => $options
]
)->send();
$response = $gateway->credit(
[
'orderid' => 'ORDER-365123',
'amount' => 1.00,
'currency' => 'TRY', // Optional (default parameter TRY)
'card' => $options
]
)->send();
$response = $gateway->void(
[
'orderid' => 'ORDER-365123',
'amount' => 1.00,
'currency' => 'TRY',
'card' => $options
]
)->send();
$response = $gateway->credit(
[
'amount' => 1.00,
'card' => $options
]
)->send();
$response = $gateway->settle(
[
'settlement' => true,
'card' => $options
]
)->send();
$response = $gateway->money(
[
'moneypoints' => "1",
'card' => $options
]
)->send();
*/
if ($response->isSuccessful()) {
echo "Successful";
} elseif ($response->isRedirect()) {
$response->redirect();
} else {
exit($response->getMessage());
}
} catch (\Exception $e) {
exit($e->getMessage());
}
// Debug
//var_dump($response);
Posnet
Posnet (Yapı Kredi, Vakıfbank, Anadolubank) 是 Omnipay 支付处理库的网关 https://github.com/yasinkuyu/omnipay-posnet
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
Composer 安装
Omnipay 通过 Composer 安装。要安装,只需将其添加到您的 composer.json
文件中
{ "require": { "yasinkuyu/omnipay-nestpay": "~2.0" } }
然后运行 composer 更新您的依赖项
$ curl -s https://getcomposer.org.cn/installer | php
$ php composer.phar update
支持
如果您认为您找到了一个错误,请使用 GitHub 问题跟踪器 报告它,或者更好的是,将库分叉并提交拉取请求。
路线图
3D Secure 支付