toss_payments 0.4.4 → 0.5.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/toss_payments.rb +36 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3421919559e31bf8a7b3c6f3a94c76797766dc2f3357f9f05caae488a43730bc
|
4
|
+
data.tar.gz: 6aa9722f53c68a27f7389e5e79186f1766a4c50c6196eae6ef4851473263388e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '00364790f9b04eb4db2a842b036db9c242f8d4b6ebb1767de0259f7480a1ced4a43ea751f4766f35d8bb5eae1d87844601f035a1f2b7c3616eb60e0b3e801179'
|
7
|
+
data.tar.gz: eef6e7651b391f863320f3a1e5f4f271a31e1403a28219f6be0451557b508027a2675c24fc2940150d94eaadcd908a0cd58d723bee9272a7151f18e5b5292ce5
|
data/lib/toss_payments.rb
CHANGED
@@ -115,6 +115,40 @@ module TossPayments
|
|
115
115
|
"SD": "SK증권",
|
116
116
|
}.as_json
|
117
117
|
|
118
|
+
CardNames = {
|
119
|
+
"3K": "기업비씨",
|
120
|
+
"46": "광주",
|
121
|
+
"71": "롯데",
|
122
|
+
"30": "산업",
|
123
|
+
"31": "BC",
|
124
|
+
"51": "삼성",
|
125
|
+
"38": "새마을",
|
126
|
+
"41": "신한",
|
127
|
+
"62": "신협",
|
128
|
+
"36": "씨티",
|
129
|
+
"33": "우리",
|
130
|
+
"W1": "우리",
|
131
|
+
"37": "우체국",
|
132
|
+
"39": "저축",
|
133
|
+
"35": "전북",
|
134
|
+
"42": "제주",
|
135
|
+
"15": "카카오뱅크",
|
136
|
+
"3A": "케이뱅크",
|
137
|
+
"24": "토스뱅크",
|
138
|
+
"21": "하나",
|
139
|
+
"61": "현대",
|
140
|
+
"11": "국민",
|
141
|
+
"91": "농협",
|
142
|
+
"34": "수협",
|
143
|
+
"6D": "다이너스",
|
144
|
+
"6I": "디스커버",
|
145
|
+
"4M": "마스터",
|
146
|
+
"3C": "유니온페이",
|
147
|
+
"7A": "AMEX",
|
148
|
+
"4J": "JCB",
|
149
|
+
"4V": "비자",
|
150
|
+
}.as_json
|
151
|
+
|
118
152
|
HOST = "https://api.tosspayments.com/v1"
|
119
153
|
|
120
154
|
class Config
|
@@ -250,6 +284,7 @@ module TossPayments
|
|
250
284
|
end,
|
251
285
|
is_partial_cancelable: response["isPartialCancelable"],
|
252
286
|
card: response["card"] ? {
|
287
|
+
card_name: CardNames[response["card"]["issuerCode"]],
|
253
288
|
amount: response["card"]["amount"],
|
254
289
|
issuer_code: response["card"]["issuerCode"],
|
255
290
|
acquirer_code: response["card"]["acquirerCode"],
|
@@ -333,6 +368,7 @@ module TossPayments
|
|
333
368
|
method: response["method"],
|
334
369
|
billing_key: response["billingKey"],
|
335
370
|
card: {
|
371
|
+
card_name: CardNames[response["card"]["issuerCode"]],
|
336
372
|
issuer_code: response["card"]["issuerCode"],
|
337
373
|
acquirer_code: response["card"]["acquirerCode"],
|
338
374
|
number: response["card"]["number"],
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toss_payments
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Soohyeon Lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: toss payments api
|
14
14
|
email: lsh59727@gmail.com
|