unp_smart 0.0.1 → 0.1.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 +4 -4
- data/README.md +50 -6
- data/lib/unp_smart/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1e6fab91beaa21a5e9be24293bac4c0acfb9602
|
4
|
+
data.tar.gz: bd661d9892db68861023319c1cc4c076723f6a23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e37e4ec501319ca55e096570066e5725fbdd3653a413d4173dc7f8115d540aa4beb70abf0c563f48dafc810556551972bffa559ab5b2e44c87c4be9f0954bb59
|
7
|
+
data.tar.gz: 03c261effb0338e21e13a9bd401774ca4eb9b5c715c660728bb17ae2197af7ac1e2abddbdb28d4ab1f2f8335bfe8a584e57d2c837b404ae23c01c9e60fc04483
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
#
|
1
|
+
# 银联账单接口Ruby SDK
|
2
2
|
|
3
|
-
|
3
|
+
提供此版SDK,方便用户调用银联账单服务接口
|
4
4
|
|
5
|
-
##
|
5
|
+
## 安装
|
6
6
|
|
7
7
|
Add this line to your application's Gemfile:
|
8
8
|
|
@@ -16,13 +16,57 @@ Or install it yourself as:
|
|
16
16
|
|
17
17
|
$ gem install unp_smart
|
18
18
|
|
19
|
-
##
|
19
|
+
## 配置
|
20
|
+
|
21
|
+
在项目下增加config/unp_smart.yml文件
|
22
|
+
|
23
|
+
```
|
24
|
+
development:
|
25
|
+
account: '000000'
|
26
|
+
secret_key: ''
|
27
|
+
server: 'https://data.unionpaysmart.com'
|
28
|
+
debug: true
|
29
|
+
verbose: false
|
30
|
+
raw_response: true
|
31
|
+
|
32
|
+
```
|
33
|
+
|
34
|
+
* account 账单服务账号
|
35
|
+
* secret_key 私钥
|
36
|
+
* server 账单服务地址
|
37
|
+
* debug 是否开始debug模式
|
38
|
+
* verbose 是否开始verbose模式
|
39
|
+
* raw_response 是否解析返回结果
|
40
|
+
|
41
|
+
|
42
|
+
## 使用
|
43
|
+
|
44
|
+
```
|
45
|
+
UnpSmart.get path,params,&block
|
46
|
+
|
47
|
+
UnpSmart.post path,params,&block
|
48
|
+
```
|
49
|
+
|
50
|
+
支持 post or get,根据官方文档选择即可,接受两个参数
|
51
|
+
|
52
|
+
* 请求的接口 此接口可以从官方文档中得到
|
53
|
+
* 业务参数
|
54
|
+
|
55
|
+
如:
|
56
|
+
|
57
|
+
```
|
58
|
+
UnpSmart.get '/merchant/queryName',{mName: '巴黎春天'}
|
59
|
+
```
|
60
|
+
|
61
|
+
如果只关心返回成功结果,可以将配置参数raw_response设置为false,那么将返回两个值
|
62
|
+
|
63
|
+
* 第一个为接口是否请求成功,true or false
|
64
|
+
* 第二个为请求的内容,如果失败为失败信息
|
20
65
|
|
21
|
-
TODO: Write usage instructions here
|
22
66
|
|
23
67
|
## Contributing
|
24
68
|
|
25
|
-
1. Fork it ( https://github.com/
|
69
|
+
1. Fork it ( https://github.com/unpsmart/unp_smart/fork )
|
26
70
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
71
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
72
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/lib/unp_smart/version.rb
CHANGED