bluedogtraining/pway 问题修复 & 功能扩展

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

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

bluedogtraining/pway

最新稳定版本:v1.0.0

Composer 安装命令:

composer require bluedogtraining/pway

包简介

Simple API for Eway Payment Gateway

README 文档

README

This library has been deprecated in favour of bluedogtraining/guzzle-eway, which leverages the Guzzle HTTP library.

Simple API for Eway Payment Gateway Build Status

See http://www.eway.com.au/Developer/eway-api/ for more detail on the Eway Payment Gateway.

Installation

Installation is done using http://getcomposer.org/ and http://packagist.org/.

Usage

<?php
$request = new \Pway\Request(87654321);
$request->ewayTotalAmount     = 1000; // Ten dollars
$request->ewayCardHoldersName = 'Test Account';
$request->ewayCardNumber      = '4444333322221111';
$request->ewayCardExpiryMonth = '12';
$request->ewayCardExpiryYear  = '20';
$request->ewayCVN             = '123';

$response = $request->send();

if ($response->isSuccessful()) {
    echo "Thanks for your payment.";
} else {
    echo "Error: ".$response->getStatus();
}

Magic

Request

__set() and __get allow you to set request data upon the request object, as long as the requests match one of the allowed request fields in the Eway documentation.

Example:

$request->ewayCardHoldersName = 'Foo Bar';

Response

__get() allows you to retreive response data returned from the Eway API. The fields that you can fetch match the fields returned in the response XML. If a field is not present, it will simply return null.

Example:

echo $response->ewayTrxnError;

Status Codes

getStatus() will return either:

You can check for a successful response with isSuccessful().

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-04-24