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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 67247bbea9fec88697e3e4ee68dc1798e0b0c3e3b8aa55099e3ea029b3b389a5
4
- data.tar.gz: c376cf2c3dc1b85317b76e3f1f3b0c4d5fde2627458ebd724160f3649b8d1eb8
3
+ metadata.gz: f373c87a1137d3bf7c549fcad179c92c96fee2b642395de0a404772b03afdfef
4
+ data.tar.gz: 9e920862908a5a4022b8d34dd1df45eed317e0ebbb7b50bb46b0fd0e77585ab9
5
5
  SHA512:
6
- metadata.gz: f6eddf1d558f4e185538788703a5609bda99b36a9426e6ecb673a261a7eece95dadc6d9f420204583bdf68d6db1a85ff7df987a4d9eef58e5dacb64f54a2de41
7
- data.tar.gz: 847f3b3631e76549006b851c5f9a0dbf7e51acc9b5130442293fb1ba4626ca37493c6f5e5b6fb8b6b55a8dfadbf77048fb49b2391eab825f530b6a0c84eb88b3
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: 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}",
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bootpay
4
- VERSION = "1.0.7"
4
+ VERSION = "1.1.0"
5
5
  BANKCODE = {
6
6
  "한국은행" => "001",
7
7
  "기업은행" => "003",
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.7
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: 2021-12-21 00:00:00.000000000 Z
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.1.4
97
+ rubygems_version: 3.2.19
99
98
  signing_key:
100
99
  specification_version: 4
101
100
  summary: Bootpay server side plugin for ruby
@@ -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