https://github.com/jasl/bifubao
An unofficial bifubao ruby gem
https://github.com/jasl/bifubao
Last synced: 8 months ago
JSON representation
An unofficial bifubao ruby gem
- Host: GitHub
- URL: https://github.com/jasl/bifubao
- Owner: jasl
- License: mit
- Created: 2014-07-21T04:24:11.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-08-25T17:55:54.000Z (almost 12 years ago)
- Last Synced: 2025-02-15T05:53:17.103Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 168 KB
- Stars: 0
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Bifubao
A simple bifubao ruby gem, without unnecessary magic or wraper, it's directly facing how bifubao api works.
Please read bifubao official document first: .
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'bifubao'
```
or development version
```ruby
gem 'bifubao', :github => 'jasl/bifubao'
```
And then execute:
```sh
$ bundle
```
## Usage
### Config
```ruby
Bifubao.private_key = YOUR_PRIVATE_KEY
Bifubao.app_hash_id = YOUR_HASH_ID
```
### Create external
Official API document:
```ruby
options = {
:external_order_id => 'YOUR_ORDER_ID', # 20130801000001
:display_name => 'YOUR_ORDER_SUBJECCT', # Test Good
:price_cny => 100
}
Bifubao::Service.create_external(options) # returns json contains result
```
### Verify notify
TODO
## Contributing
Bug report or pull request are welcome.
### Make a pull request
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
Please write unit test with your code if necessary.