0.0
No commit activity in last 3 years
No release in over 3 years
A fakesite plugin that provides a stub method for alipay.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 1.10
~> 10.0
>= 0

Runtime

>= 0.2.1
 Project Readme

fakesite-alipay

Build Status Coverage Status

A fakesite plugin that provides a stub method for alipay. It's useful to bypass payment flow in develpment environment.

Installation

Add this line to your application's Gemfile:

gem 'fakesite-alipay', group: :development

And then execute:

$ bundle

Route

Make sure that you have added fakesite route in your config/route.rb

mount Fakesite::Engine => "/fakesite" if Rails.env.development?

Usage

Add registration to config/initializers/fakesite.rb

if Rails.env.development?
  WebMock.allow_net_connect!
  Fakesite.register :alipay, Fakesite::Alipay::Base, {:pid => 'PID', :key => 'KEY'}
end

PID and KEY could be fake, but they have to be equal to the settings of library (eg. Gem alipay) that you use to request Alipay.

License

The gem is available as open source under the terms of the MIT License.

Contact

The project's website is located at https://github.com/emn178/fakesite-alipay
Author: emn178@gmail.com