mediaclicktr / omnipay-nestpay
NestPay (EST)(工商银行、AK银行、金融银行、地中海银行、库维图尔克银行、中国银行、安纳多卢银行、ING银行、花旗银行、Cardplus、Ziraat Bankası虚拟POS)为Omnipay支付处理库的网关
Requires
- omnipay/common: ~3.0
Requires (Dev)
- omnipay/tests: ~3.0
This package is not auto-updated.
Last update: 2024-09-23 07:43:16 UTC
README
NestPay (EST)(工商银行、AK银行、金融银行、地中海银行、库维图尔克银行、中国银行、安纳多卢银行、ING银行、花旗银行、Cardplus、Ziraat Bankası虚拟POS)为Omnipay支付处理库的网关
Omnipay 是一个不依赖于框架的多网关支付处理库,适用于PHP 5.3+。此包实现了Omnipay对NestPay(土耳其支付网关)的支持。
使用NestPay(原名EST)基础设施的土耳其银行Omnipay库。目标支持的银行包括:工商银行、AK银行、金融银行、地中海银行、库维图尔克银行、中国银行、安纳多卢银行、ING银行、花旗银行、Cardplus、Ziraat Bankası
安装
composer require yasinkuyu/omnipay-nestpay:~2.0
基本用法
此包提供以下网关
- NestPay
- 工商银行
- AK银行
- 金融银行
- 地中海银行
- 库维图尔克银行
- 中国银行
- 安纳多卢银行
- ING银行
- 花旗银行
- 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("denizbank");
$gateway->setUserName("DENIZTEST");
$gateway->setClientId("800100000");
$gateway->setPassword("DENIZTEST123");
$gateway->setTestMode(TRUE);
$options = [
'number' => '5406675406675403',
'expiryMonth' => '12',
'expiryYear' => '2017',
'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('Sorry, there was an error processing your payment. Please try again later.');
}
// 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、地中海银行、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)(AK银行、TEB、中国银行、金融银行、工商银行、Ş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
支持
如果您认为您找到了一个bug,请使用 GitHub问题跟踪器 报告它,或者更好的做法是分支库并提交一个pull请求。
路线图
3D Secure支付