gentor/omnipay-dskbank 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

gentor/omnipay-dskbank

Composer 安装命令:

composer require gentor/omnipay-dskbank

包简介

dskbank.bg gateway for Omnipay payment processing library

README 文档

README

DSK Bank gateway for Omnipay payment processing library

Inspired from omnipay-paymentgateru

Omnipay is a framework agnostic, multi-gateway payment processing library for PHP. This package implements DSK Bank support for Omnipay.

Installation

Omnipay is installed via Composer. To install, simply require league/omnipay and gentor/omnipay-dskbank with Composer:

composer require league/omnipay gentor/omnipay-dskbank

Basic Usage

Purchase

$gateway = Omnipay::create('DskBank');
$gateway->setUserName($config['userName'])
    ->setPassword($config['password'])
    ->setTestMode($config['testMode']);

$response = $gateway->authorize([
    'orderNumber' => time(),
    'amount' => 5 * 100,
    'description' => 'Dsk Bank Test Purchase',
    'returnUrl' => 'http://dskbank.test/return.php',
    'failUrl' => 'http://dskbank.test/return.php',
])->send();

$bankReference = $response->getTransactionReference();

if ($response->isRedirect()) {
    // Redirect to offsite payment gateway
    $response->redirect();
} else {
    // Payment failed
    echo $response->getMessage();
}

Complete Purchase

$status = $gateway->status($_GET)->send();
$statusExtended = $gateway->statusExtended($_GET)->send();

$orders = $gateway->getLastOrders([
    'size' => 5,
    'from' => '20200926000000',
    'to' => '20200928000000',
    'transactionStates' => 'APPROVED,REFUNDED',
])->send();

$refund = $gateway->refund([
   'orderId' => $bankReference,
   'amount' => $price * 100
])->send();

$success = $refund->isSuccessful();

统计信息

  • 总下载量: 5.09k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-09-27