bootpay 1.0.1 → 1.0.2

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
  SHA256:
3
- metadata.gz: 4f4571d472aea39ea1af1906ba2d69cc60712f0438633cd697097bd03bdae78d
4
- data.tar.gz: 9027f9825321d43c1f93c852cbb40605338dcccaed31f98ace4a05c7ca41ee1b
3
+ metadata.gz: 33a31e6f76ace934746e7409622b6ba70dc3c186c6776aab87036709d7b0a95e
4
+ data.tar.gz: d22f00f5a79f49f567d210c338a2482906b1424cf9e227d7cb99925ab4522c4e
5
5
  SHA512:
6
- metadata.gz: 3692d6c28adb7e876f1cf129482182b99eed58f5570bae2d07d1cf779ef255877402f59523e8a11ef8f5559a54824e12441a94a37503ccc2dd4d43b6f0621df5
7
- data.tar.gz: d9c4056f3b02a808ff6358b6bf7ef52fa5f2ca1c0a35e60da2467e9cdbdc57bed9b08df2914aac77a65d15f4e716af167e486621329713105c5b94ae2f4aad8a
6
+ metadata.gz: 36f81ee3544ac487d51401bfd6456caef845a2d9096b3bf085a51113f207080bbb30c1feaaaef49b1ede76f99459fb1fea9d54b11975e85b3f03f4d61bf5ffca
7
+ data.tar.gz: '09ed84e9f946fc8c1f17565a7aa44c2bea2372cdfbcf47d8d599b8ac5e88013f30ac977dca7d089b53865decb22a0c7f1baec752b35e2421c5781c52472e8b6e'
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2021 ehowlsla
3
+ Copyright (c) 2021 bootpay
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,10 +1,33 @@
1
- # Bootpay Ruby 플러그인
2
1
 
3
- Bootpay Ruby 라이브러리는 Ruby 언어로 작성된 어플리케이션, 프레임워크 등에서 사용가능합니다.
2
+ ## Bootpay Java Server Side Library
3
+ 부트페이 공식 Ruby 라이브러리 입니다 (서버사이드 용)
4
4
 
5
- ## Installation
5
+ Ruby 언어로 작성된 어플리케이션, 프레임워크 등에서 사용가능합니다.
6
+
7
+ * PG 결제창 연동은 클라이언트 라이브러리에서 수행됩니다. (Javascript, Android, iOS, React Native, Flutter 등)
8
+ * 결제 검증 및 취소, 빌링키 발급, 본인인증 등의 수행은 서버사이드에서 진행됩니다. (Java, PHP, Python, Ruby, Node.js, Go, ASP.NET 등)
9
+
10
+
11
+ ## 기능
12
+ 1. (부트페이 통신을 위한) 토큰 발급 요청
13
+ 2. 결제 검증
14
+ 3. 결제 취소 (전액 취소 / 부분 취소)
15
+ 4. 빌링키 발급
16
+
17
+ 4-1. 발급된 빌링키로 결제 승인 요청
18
+
19
+ 4-2. 발급된 빌링키로 결제 승인 예약 요청
20
+
21
+ 4-2-1. 발급된 빌링키로 결제 승인 예약 - 취소 요청
22
+
23
+ 4-3. 빌링키 삭제
24
+ 5. (부트페이 단독) 사용자 토큰 발급
25
+ 6. (부트페이 단독) 결제 링크 생성
26
+ 7. 서버 승인 요청
27
+ 8. 본인 인증 결과 조회
28
+
29
+ ## Gem으로 설치하기
6
30
 
7
- Gemfile 파일을 이용하여 설치하기
8
31
 
9
32
  ```ruby
10
33
  gem 'bootpay'
@@ -20,7 +43,7 @@ Gemfile에 위 라인을 추가하고, 아래 라인으로 인스톨 합니다.
20
43
 
21
44
  $ gem install backend-ruby
22
45
 
23
- ## Getting Started
46
+ ## 사용하기
24
47
 
25
48
  ```ruby
26
49
  # 결제 검증하기
@@ -30,11 +53,40 @@ Gemfile에 위 라인을 추가하고, 아래 라인으로 인스톨 합니다.
30
53
  application_id: '5b8f6a4d396fa665fdc2b5ea',
31
54
  private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=',
32
55
  )
33
- if api.request_access_token.success?
34
- response = api.verify(receipt_id)
56
+ if api.request_access_token.success?
35
57
  print response.data.to_json
36
58
  end
37
59
  ```
60
+ 함수 단위의 샘플 코드는 [이곳](https://github.com/bootpay/backend-ruby/tree/main/spec/bootpay)을 참조하세요.
61
+
62
+
63
+ ## 1. 토큰 발급
64
+
65
+ 부트페이와 서버간 통신을 하기 위해서는 부트페이 서버로부터 토큰을 발급받아야 합니다.
66
+ 발급된 토큰은 30분간 유효하며, 최초 발급일로부터 30분이 지날 경우 토큰 발급 함수를 재호출 해주셔야 합니다.
67
+ ```ruby
68
+ api = Bootpay::Api.new(
69
+ application_id: '5b8f6a4d396fa665fdc2b5ea',
70
+ private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=',
71
+ )
72
+ if api.request_access_token.success?
73
+ print response.data.to_json
74
+ end
75
+ ```
76
+
77
+
78
+ ## 2. 결제 검증
79
+ 결제창 및 정기결제에서 승인/취소된 결제건에 대하여 올바른 결제건인지 서버간 통신으로 결제검증을 합니다.
80
+ ```ruby
81
+ Bootpay bootpay = new Bootpay("5b8f6a4d396fa665fdc2b5ea", "rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=");
82
+
83
+ try {
84
+ ResDefault<VerificationData> res = bootpay.verify("6100e8e7019943003850f9b0");
85
+ System.out.println(res.toJson());
86
+ } catch (Exception e) {
87
+ e.printStackTrace();
88
+ }
89
+ ```
38
90
 
39
91
  ## Documentation
40
92
 
data/bootpay-1.0.0.gem ADDED
Binary file
data/bootpay-1.0.1.gem ADDED
Binary file
@@ -1,6 +1,25 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bootpay
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.2"
5
+ BANKCODE = {
6
+ "한국은행" => "001",
7
+ "기업은행" => "003",
8
+ "국민은행" => "004",
9
+ "외환은행" => "005",
10
+ "수협은행" => "007",
11
+ "농협은행" => "011",
12
+ "우리은행" => "020",
13
+ "SC은행" => "023",
14
+ "대구은행" => "031",
15
+ "부산은행" => "032",
16
+ "광주은행" => "034",
17
+ "경남은행" => "039",
18
+ "우체국" => "071",
19
+ "KEB하나은행" => "081",
20
+ "신한은행" => "088",
21
+ "케이뱅크" => "089",
22
+ "카카오뱅크" => "090",
23
+ }
5
24
  end
6
25
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootpay
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - bootpay
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-03 00:00:00.000000000 Z
11
+ date: 2021-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -56,6 +56,8 @@ files:
56
56
  - Rakefile
57
57
  - bin/console
58
58
  - bin/setup
59
+ - bootpay-1.0.0.gem
60
+ - bootpay-1.0.1.gem
59
61
  - bootpay.gemspec
60
62
  - lib/.DS_Store
61
63
  - lib/bootpay.rb