toss_payments 0.6.1 → 0.6.3

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/toss_payments.rb +3 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19fd7f260f18f07dbbd138cba5ce4e83505b69dd866c98c57b6a625535915c22
4
- data.tar.gz: fa6f41b17e4a86a0e1a29edbcc085154547a29297ff216f5cca84fe1e9be7cde
3
+ metadata.gz: 207c034e0e146ae505022c026a37839fd49ebae959acb7af86b844430c4b3c59
4
+ data.tar.gz: e1534011195e05f027dfcda8e1dc20a30b5a657a9357a561581a991bc434b138
5
5
  SHA512:
6
- metadata.gz: a2b590261adaf9c820c492a2a20d41286faa2374cae3af02b5dab985b96d2feb5f483fb6d2018cbd9507015fad28a04e22ee8430852febb3ff59bd3715cd8066
7
- data.tar.gz: 4be8a8dc2160ebf270fc19ab758ed8df38cf6040b881ac41bcff60a5acc617eae0aad624a75efc25cacd3b0a9776dd4590b28916f577749782325f824cdcd874
6
+ metadata.gz: f46ede360800de65faa57736b242da0fc01e10886d849af165de69274922f6444e5b6b8d66bc9cb9d6a8c65143c6875be98623fcff86960d9f943b3a5902a316
7
+ data.tar.gz: e3dc5666e111fffbcf31cc3a0e5ead8ddaff14f578f5cdc8fc02b66d97b5d6b83b2af4cac7cd9b6513a9746fca82cf911f530d60a1a1d78de41ff67f1d8026e3
data/lib/toss_payments.rb CHANGED
@@ -185,9 +185,9 @@ module TossPayments
185
185
  get(uri)
186
186
  end
187
187
 
188
- def cancel(payment_key, payload = {})
188
+ def cancel(payment_key, payload = {}, secret_key_type: :normal)
189
189
  uri = "payments/#{payment_key}/cancel"
190
- post(uri, payload)
190
+ post(uri, payload, secret_key_type: secret_key_type)
191
191
  end
192
192
 
193
193
  def payments_key_in(payload = {})
@@ -218,7 +218,7 @@ module TossPayments
218
218
  private
219
219
 
220
220
  def headers(secret_key_type: :normal)
221
- { "Authorization": "Basic #{Base64.strict_encode64((secret_key_type === :billing ? billing_config : config).secret_key + ":")}" }
221
+ { "Authorization": "Basic #{Base64.strict_encode64((secret_key_type === :billing ? config.billing_secret_key : config.secret_key) + ":")}" }
222
222
  end
223
223
 
224
224
  def get(uri, payload = {}, response_type: :payment, secret_key_type: :normal)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toss_payments
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Soohyeon Lee