承接 hypercharge/hypercharge-schema 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

hypercharge/hypercharge-schema

Composer 安装命令:

composer require hypercharge/hypercharge-schema

包简介

Hypercharge API JSON Schema

README 文档

README

json-schema for hypercharge payment request data.

Matches hypercharge-API-doc version 2.24 2014/09/16

Build Status Gem Version

Fixtures

There is a rather complete set of hypercharge API xml requests, respsonses and notifications provided as fixtures in /test/fixtures/

A fixture loader is provided for php, ruby and javascript.

php:

// requests to hypercharge
$xmlString = Hypercharge\JsonSchemaFixture::request('sale.xml');

// or as json string
$jsonString = Hypercharge\JsonSchemaFixture::request('sale.json');

// response from hypercharge
$xmlString = Hypercharge\JsonSchemaFixture::response('sale.xml');

// notification from hypercharge
$postData = json_decode(Hypercharge\JsonSchemaFixture::notification('transaction_notification.json'), true);

ruby:

# request to hypercharge
xmlString = Hypercharge::Schema::Fixture.xml 'requests/sale'

# or as parsed json
jsonData = Hypercharge::Schema::Fixture.json 'requests/sale'

# response from hypercharge
xmlString = Hypercharge::Schema::Fixture.xml 'responses/sale'

# notification from hypercharge
jsonData = Hypercharge::Schema::Fixture.json 'notifications/transaction_notification'

javascript (sync, no async atm.):

var Schema = require('hypercharge-schema').Schema;

// request to hypercharge
var xmlString = Schema.Fixture.xml('requests/sale');

// or as parsed json
var jsonData = Schema.Fixture.json('requests/sale');

// response from hypercharge
var xmlString = Schema.Fixture.xml('responses/sale');

// notification from hypercharge
var postData = Schema.Fixture.json('notifications/transaction_notification');

Tests

Assuming you have all dependencies installed (see below) you can run all tests (ruby, php, javascript) at once.

./test/all.sh

Or one by one:

Ruby

ruby >= 1.9.3

Install dependencies

bundle

Run tests

rake

PHP

php >= 5.3

Install Composer and dependencies

curl -o composer.phar http://getcomposer.org/composer.phar
php composer.phar install
php composer.phar update --dev

run test

php test/php/all.php

JavaScript

Install node.js

Install dependencies

npm install

run test

npm test

Btw: nvm is a handy tool for installing and handling multiple node.js versions on one mashine.

Warranty

This software is provided "as is" and without any express or implied warranties, including, without limitation, the implied warranties of merchantibility and fitness for a particular purpose.

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 11
  • Forks: 4
  • 开发语言: Ruby

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-06-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固