bootpay 1.0.7 → 1.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/lib/bootpay/payment_resource.rb +3 -2
- data/lib/bootpay/rest.rb +3 -0
- data/lib/bootpay/version.rb +1 -1
- data/lib/bootpay.rb +4 -3
- metadata +3 -4
- data/lib/bootpay/bootpay.rb +0 -49
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f373c87a1137d3bf7c549fcad179c92c96fee2b642395de0a404772b03afdfef
|
4
|
+
data.tar.gz: 9e920862908a5a4022b8d34dd1df45eed317e0ebbb7b50bb46b0fd0e77585ab9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04457d99a2327f0eb55dea7a2ba49d6bf604c9f23613307498630c0ac58583c1f19ee8ae183d70eaafb710258c334c6e973190181d0e8a7f308d2672394ea081
|
7
|
+
data.tar.gz: efe6447e7b7da0aafa19c85d97383343348e8283cd26eee5037979e1741d2f06f8e67a5d5386c1025a231398d75ee1a6955da45a2fc1e2feba1d3faf6101776e
|
@@ -18,11 +18,12 @@ module Bootpay::PaymentResource
|
|
18
18
|
# Comment by Gosomi
|
19
19
|
# Date: 2021-12-21
|
20
20
|
#----------------------------------------------------------
|
21
|
-
def create_webhook(receipt_id)
|
21
|
+
def create_webhook(receipt_id:, webhook_url:)
|
22
22
|
request(
|
23
23
|
uri: 'webhook',
|
24
24
|
payload: {
|
25
|
-
receipt_id:
|
25
|
+
receipt_id: receipt_id,
|
26
|
+
webhook_url: webhook_url
|
26
27
|
}
|
27
28
|
)
|
28
29
|
end
|
data/lib/bootpay/rest.rb
CHANGED
@@ -8,6 +8,9 @@ module Bootpay::Rest
|
|
8
8
|
# Comment by Gosomi
|
9
9
|
# Date: 2021-05-21
|
10
10
|
def request(method: :post, uri:, payload: {}, headers: {})
|
11
|
+
|
12
|
+
print([Bootpay::Api::API[@mode.to_sym], uri].join('/'))
|
13
|
+
|
11
14
|
response = HTTP.headers(
|
12
15
|
{
|
13
16
|
# Authorization: "Bearer #{@token}",
|
data/lib/bootpay/version.rb
CHANGED
data/lib/bootpay.rb
CHANGED
@@ -32,9 +32,10 @@ module Bootpay
|
|
32
32
|
|
33
33
|
API =
|
34
34
|
{
|
35
|
-
development: 'https://dev-api.bootpay.co.kr
|
36
|
-
stage: 'https://stage-api.bootpay.co.kr
|
37
|
-
production: 'https://api.bootpay.co.kr
|
35
|
+
development: 'https://dev-api.bootpay.co.kr',
|
36
|
+
stage: 'https://stage-api.bootpay.co.kr',
|
37
|
+
production: 'https://api.bootpay.co.kr',
|
38
|
+
ehowlsla: 'https://ehowlsla.bootpay.co.kr/api/v2'
|
38
39
|
}.freeze
|
39
40
|
|
40
41
|
def initialize(application_id:, private_key:, mode: 'production')
|
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
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bootpay
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -61,7 +61,6 @@ files:
|
|
61
61
|
- lib/bootpay.rb
|
62
62
|
- lib/bootpay/.DS_Store
|
63
63
|
- lib/bootpay/billing.rb
|
64
|
-
- lib/bootpay/bootpay.rb
|
65
64
|
- lib/bootpay/cancel.rb
|
66
65
|
- lib/bootpay/easy.rb
|
67
66
|
- lib/bootpay/escrow.rb
|
@@ -95,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
94
|
- !ruby/object:Gem::Version
|
96
95
|
version: '0'
|
97
96
|
requirements: []
|
98
|
-
rubygems_version: 3.
|
97
|
+
rubygems_version: 3.2.19
|
99
98
|
signing_key:
|
100
99
|
specification_version: 4
|
101
100
|
summary: Bootpay server side plugin for ruby
|
data/lib/bootpay/bootpay.rb
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
require 'active_support/all'
|
2
|
-
require 'http'
|
3
|
-
require_relative 'response'
|
4
|
-
require_relative 'bootpay/billing'
|
5
|
-
require_relative 'bootpay/cancel'
|
6
|
-
require_relative 'bootpay/easy'
|
7
|
-
require_relative 'bootpay/escrow'
|
8
|
-
require_relative 'bootpay/link'
|
9
|
-
require_relative 'bootpay/naverpay'
|
10
|
-
require_relative 'bootpay/payment_resource'
|
11
|
-
require_relative 'bootpay/reseller'
|
12
|
-
require_relative 'bootpay/rest'
|
13
|
-
require_relative 'bootpay/submit'
|
14
|
-
require_relative 'bootpay/token'
|
15
|
-
require_relative 'bootpay/verification'
|
16
|
-
require_relative "bootpay/version"
|
17
|
-
|
18
|
-
module Bootpay
|
19
|
-
class Api
|
20
|
-
include Billing
|
21
|
-
include Cancel
|
22
|
-
include Easy
|
23
|
-
include Escrow
|
24
|
-
include Link
|
25
|
-
include Naverpay
|
26
|
-
include PaymentResource
|
27
|
-
include Reseller
|
28
|
-
include Rest
|
29
|
-
include Submit
|
30
|
-
include Token
|
31
|
-
include Verification
|
32
|
-
|
33
|
-
API =
|
34
|
-
{
|
35
|
-
development: 'https://dev-api.bootpay.co.kr/',
|
36
|
-
stage: 'https://stage-api.bootpay.co.kr/',
|
37
|
-
production: 'https://api.bootpay.co.kr/'
|
38
|
-
}.freeze
|
39
|
-
|
40
|
-
def initialize(application_id:, private_key:, mode: 'production')
|
41
|
-
|
42
|
-
@application_id = application_id
|
43
|
-
@private_key = private_key
|
44
|
-
@mode = mode.presence || 'production'
|
45
|
-
@token = nil
|
46
|
-
raise ArgumentError, "개발환경 mode는 development, stage, production 중에서 선택이 가능합니다." if API[@mode.to_sym].blank?
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|