iamport 0.2.2 → 0.2.4
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/.travis.yml +8 -0
- data/CHANGELOG.md +17 -0
- data/README.md +16 -0
- data/lib/iamport/version.rb +1 -1
- data/lib/iamport.rb +16 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 83829b1d4beb85703b707bdc156550353cd1c566
|
|
4
|
+
data.tar.gz: 0bde5b44d72e1be6c970d854b6fa4bf9c8ebca6e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 348883e8a7dd92920b88572101e519e07eafbb9c0b9e8c5deb29a44ef3d2c235e7663fdefc98a7b729356c07f86686485ecd94d4610fea5f41ce958c0d25d2f4
|
|
7
|
+
data.tar.gz: 229520de3de7577fb5d3ec4977a992d6eea4dc7dea116095de7f94046b411eb4d0651f65327af6947db72de228df8d88682edcc0e886eb63f45ab1223c8207d8
|
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
All notable changes to this project will be documented in this file.
|
|
3
|
+
|
|
4
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
5
|
+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.2.4] - 2017-09-29 Fri.
|
|
10
|
+
### Added
|
|
11
|
+
- prepare method for create payment preparation information by @cancue.
|
|
12
|
+
- prepared method for get list of payment preparation information by @cancue.
|
|
13
|
+
- payments.validation use case to README.md by @cancue.
|
|
14
|
+
- CHANGELOG.md file to record change logs by @jhsbeat.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- Nothing changed.
|
data/README.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Ruby 사용자를 위한 아임포트 REST API 연동 모듈입니다.
|
|
4
4
|
|
|
5
|
+
## Code Status
|
|
6
|
+
|
|
7
|
+
[](https://travis-ci.org/iamport/iamport-rest-client-ruby)
|
|
8
|
+
|
|
5
9
|
# 세팅하는 방법
|
|
6
10
|
|
|
7
11
|
```ruby
|
|
@@ -32,6 +36,18 @@ Iamport.payments(status: "paid")
|
|
|
32
36
|
Iamport.payments(status: "paid", page: 2)
|
|
33
37
|
```
|
|
34
38
|
|
|
39
|
+
## payments.validation API
|
|
40
|
+
|
|
41
|
+
##### 결제예정금액을 사전등록
|
|
42
|
+
```ruby
|
|
43
|
+
Iamport.prepare(merchant_uid: "M00001", amount: 10000)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
##### 사전등록된 결제정보를 조회
|
|
47
|
+
```ruby
|
|
48
|
+
Iamport.prepared(merchant_uid: "M00001")
|
|
49
|
+
```
|
|
50
|
+
|
|
35
51
|
## cancel API
|
|
36
52
|
body의 값은 [API 문서 - cancel](https://api.iamport.kr/#!/payments/cancelPayment)에 있는 사용하는 것을 추가하여 진행하면 됩니다.
|
|
37
53
|
|
data/lib/iamport/version.rb
CHANGED
data/lib/iamport.rb
CHANGED
|
@@ -59,6 +59,22 @@ module Iamport
|
|
|
59
59
|
_get(uri)
|
|
60
60
|
end
|
|
61
61
|
|
|
62
|
+
# Prepare payment validation
|
|
63
|
+
# https://api.iamport.kr/#!/payments/prepare
|
|
64
|
+
def prepare(body)
|
|
65
|
+
uri = "payments/prepare"
|
|
66
|
+
|
|
67
|
+
_post(uri, body)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Get prepared payment information by merchant_uid
|
|
71
|
+
# https://api.iamport.kr/#!/payments/prepare/:merchant_uid
|
|
72
|
+
def prepared(merchant_uid)
|
|
73
|
+
uri = "payments/prepare/#{merchant_uid}"
|
|
74
|
+
|
|
75
|
+
_get(uri)
|
|
76
|
+
end
|
|
77
|
+
|
|
62
78
|
# Canceled payments
|
|
63
79
|
# https://api.iamport.kr/#!/payments/cancelPayment
|
|
64
80
|
def cancel(body)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: iamport
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sell it
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-09-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -74,6 +74,8 @@ extensions: []
|
|
|
74
74
|
extra_rdoc_files: []
|
|
75
75
|
files:
|
|
76
76
|
- ".gitignore"
|
|
77
|
+
- ".travis.yml"
|
|
78
|
+
- CHANGELOG.md
|
|
77
79
|
- CODE_OF_CONDUCT.md
|
|
78
80
|
- Gemfile
|
|
79
81
|
- LICENSE
|