tappay 0.4.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 910d88773959e2f6c92058ddbf0c953d3c3a95e0
4
- data.tar.gz: f5b083ae6707ebe345558cf0ba770c402b2f1429
3
+ metadata.gz: 57aaec35e9974656fcb7e4bfa5f17234696fe5dc
4
+ data.tar.gz: 7b0c1e539a8088f7493906ba10bf59f03d56b0d4
5
5
  SHA512:
6
- metadata.gz: 76f0a683a632252c9ccf3c7dfab74a257e9de343e1dc310a969799f479f3bd54a081b46b6c3eb25b206671a8c9cee096b1bf1cc2ba5e8ab9d95059f8521fbce5
7
- data.tar.gz: f2f2e504881825f070faf948764fefd675287d18afaaef5258b99b593c79db6d3190795deb434307d3324fca42375a68c38cb28b43201d457b48aa9711a540ef
6
+ metadata.gz: '08e8627a46ccb1fa84d8957ce8af23d8074fb9a3ce357ac63be77bfbed75535b8e249364854a461780793fbd98aa40acbac04680abf8c09e3d1f5ed8df92f83a'
7
+ data.tar.gz: 101c0b61c6cb17f53b3643dbd688968bc601ea35a266e9493685b472e03745d84b69abe89d80ad05a7fc338fbd8c17018158ead7de9a898693cc83c5e2e6f9d0
@@ -1,5 +1,6 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
+ - 2.0.0
4
5
  - 2.4.1
5
6
  before_install: gem install bundler -v 1.16.1
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # TapPay
2
2
 
3
+ [![Build Status](https://travis-ci.org/hzchirs/tappay-ruby.svg?branch=master)](https://travis-ci.org/hzchirs/tappay-ruby)
4
+ [![Maintainability](https://api.codeclimate.com/v1/badges/1bc81b37e0025c3de443/maintainability)](https://codeclimate.com/github/hzchirs/tappay-ruby/maintainability)
5
+
3
6
  A very simple [TapPay](https://www.tappaysdk.com/tch) API wrapper written in the Ruby language.
4
7
 
5
8
  ## Installation
@@ -23,7 +26,7 @@ See [TapPay Backend API](https://docs.tappaysdk.com/tutorial/zh/back.html#back).
23
26
 
24
27
  ## Usage
25
28
 
26
- You can setup mode, partner_key and merchant_id. It requests sandbox server or production server by mode.
29
+ You need to setup mode which affects requests sent to sandbox or production server.
27
30
  The partner_key and merchant_id are optional, thay could also be specified in request params.
28
31
 
29
32
  ```ruby
@@ -1,7 +1,7 @@
1
1
  module TapPay
2
2
  class PayByPrime
3
3
  def self.call(params = {}, &block)
4
- TapPay::Request.send(TapPay::APIResource.pay_by_prime_url, params, &block)
4
+ TapPay::Request.post(TapPay::APIResource.pay_by_prime_url, params, &block)
5
5
  end
6
6
  end
7
7
  end
@@ -1,7 +1,7 @@
1
1
  module TapPay
2
2
  class PayByToken
3
3
  def self.call(params = {}, &block)
4
- TapPay::Request.send(TapPay::APIResource.pay_by_token_url, params, &block)
4
+ TapPay::Request.post(TapPay::APIResource.pay_by_token_url, params, &block)
5
5
  end
6
6
  end
7
7
  end
@@ -1,7 +1,7 @@
1
1
  module TapPay
2
2
  class Refund
3
3
  def self.call(params = {}, &block)
4
- TapPay::Request.send(TapPay::APIResource.refund_url, params, &block)
4
+ TapPay::Request.post(TapPay::APIResource.refund_url, params, &block)
5
5
  end
6
6
  end
7
7
  end
@@ -3,7 +3,7 @@ require 'json'
3
3
 
4
4
  module TapPay
5
5
  class Request
6
- def self.send(url, params = {}, &block)
6
+ def self.post(url, params = {}, &block)
7
7
  payload = default_params.merge(params).to_json
8
8
  uri = URI(url)
9
9
  req = Net::HTTP::Post.new(uri)
@@ -1,3 +1,3 @@
1
1
  module TapPay
2
- VERSION = "0.4.1"
2
+ VERSION = "0.5.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tappay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - HzChris
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-25 00:00:00.000000000 Z
11
+ date: 2018-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler