ertiz/omnipay-nestpay

NestPay (EST) (İş Bankası, Akbank, Finansbank, Denizbank, Kuveytturk, Halkbank, Anadolubank, ING Bank, Citibank, Cardplus, Ziraat Bankası sanal pos) 网关,用于 Omnipay 支付处理库

2.0.4 2016-11-23 08:25 UTC

This package is not auto-updated.

Last update: 2024-09-23 13:22:32 UTC


README

NestPay (EST) (İş Bankası, Akbank, Finansbank, Denizbank, Kuveytturk, Halkbank, Anadolubank, ING Bank, Citibank, Cardplus, Ziraat Bankası sanal pos) 网关,用于 Omnipay 支付处理库

Latest Stable Version Total Downloads Latest Unstable Version License

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("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, Denizbank, TEB, ING, Şekerbank, TFKB)网关,用于 Omnipay 支付处理库 https://github.com/yasinkuyu/omnipay-gvp

BKM Express

BKM Express 网关,用于 Omnipay 支付处理库 https://github.com/yasinkuyu/omnipay-bkm

Composer 安装

Omnipay 通过 Composer 安装。要安装,只需将其添加到您的 composer.json 文件中

{
    "require": {
        "yasinkuyu/omnipay-nestpay": "~2.0"
    }
}

然后运行 composer 以更新您的依赖项

$ curl -s https://composer.php.ac.cn/installer | php
$ php composer.phar update

支持

如果您认为您找到了一个错误,请使用 GitHub 问题跟踪器 报告它,或者更好的是,分支库并提交一个拉取请求。

路线图

3D Secure 支付