fruitcakestudio/omnipay-sisow 问题修复 & 功能扩展

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

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

fruitcakestudio/omnipay-sisow

最新稳定版本:v3.0.3

Composer 安装命令:

composer require fruitcakestudio/omnipay-sisow

包简介

Sisow gateway for the Omnipay payment processing library

README 文档

README

Sisow gateway for the Omnipay PHP payment processing library

Build Status Latest Stable Version Total Downloads

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

Installation

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

composer require league/omnipay fruitcakestudio/omnipay-sisow

Basic Usage

The following gateways are provided by this package:

  • Sisow

For general usage instructions, please see the main Omnipay repository. See also the Sisow REST Documentation

Example

 $gateway = \Omnipay\Omnipay::create('Sisow');
    $gateway->initialize(array(
        'shopId' => '',
        'merchantId' => '0123456',
        'merchantKey' => 'b36d8259346eaddb3c03236b37ad3a1d7a67cec6',
        'testMode' => true,
    ));

    // Start the purchase
    if(!isset($_GET['trxid'])){
        $url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
        $response = $gateway->purchase(array(
            'amount' => "6.84",
            'description' => "Testorder #1234",
            'issuer' => 99,                         // Get the id from the issuers list, 99 = test issuer
            //'paymentMethod' => 'overboeking',     // For 'overboeking', extra parameters are required:
            'card' => array(
                'email' => 'barry@fruitcakestudio.nl',
                'firstName' => 'Barry',
                'lastName' => 'vd. Heuvel',
                'company' => 'Fruitcake Studio',
            ),
            'transactionId' => 1234,
            'returnUrl' => $url,
            'notifyUrl' => $url,
        ))->send();

        if ($response->isRedirect()) {
            // redirect to offsite payment gateway
            $response->redirect();
        } elseif ($response->isPending()) {
            // Process started (for example, 'overboeking')
            return "Pending, Reference: ". $response->getTransactionReference();
        } else {
            // payment failed: display message to customer
            return "Error " .$response->getCode() . ': ' . $response->getMessage();
        }
    }else{
        // Check the status
        $response = $gateway->completePurchase()->send();
        if($response->isSuccessful()){
            $reference = $response->getTransactionReference();  // TODO; Check the reference/id with your database
            return "Transaction '" . $response->getTransactionId() . "' succeeded!";
        }else{
            return "Error " .$response->getCode() . ': ' . $response->getMessage();
        }
    }

Note, transactionReference is only available in the PurchaseResponse when an issuer is set. Use the fetchIssuers response to see the available issuers, or use the Javascript script to fill the issuers

$response = Omnipay::fetchIssuers()->send();
if($response->isSuccessful()){
    print_r($response->getIssuers());
}

The billing/shipping data are set with the card parameter, with an array or CreditCard object. Other parameters that can be entered with 'overboeking' are:

  • including (true/false to include a link to pay with ideal
  • days (number of days before a reminder is sent)

Support

If you are having general issues with Omnipay, we suggest posting on Stack Overflow. Be sure to add the omnipay tag so it can be easily found.

If you want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a mailing list which you can subscribe to.

If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request.

统计信息

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

GitHub 信息

  • Stars: 6
  • Watchers: 5
  • Forks: 11
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-07-14