Skip to content

Commit e8bdba6

Browse files
committed
extra option field 추가
1 parent 406b1a3 commit e8bdba6

File tree

5 files changed

+18
-5
lines changed

5 files changed

+18
-5
lines changed

Example/SwiftyBootpay/NativeController.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ extension NativeController {
344344
// 구매자 정보
345345
let bootUser = BootpayUser()
346346
bootUser.params {
347-
$0.username = "사용자 이름"
347+
// $0.username = "사용자 이름"
348348
$0.email = "[email protected]"
349349
$0.area = "서울" // 사용자 주소
350350
$0.addr = "서울시 동작구 상도로";
@@ -363,11 +363,11 @@ extension NativeController {
363363

364364
//
365365
// $0.user_info = bootUser
366-
$0.pg = BootpayPG.NICEPAY // 결제할 PG사
366+
// $0.pg = BootpayPG.NICEPAY // 결제할 PG사
367367
// $0.account_expire_at = "2018-09-25" // 가상계좌 입금기간 제한 ( yyyy-mm-dd 포멧으로 입력해주세요. 가상계좌만 적용됩니다. 오늘 날짜보다 더 뒤(미래)여야 합니다 )
368368
// $0.method = "card" // 결제수단
369369
$0.show_agree_window = false
370-
$0.methods = [Method.BANK, Method.CARD, Method.PHONE]
370+
$0.methods = [Method.BANK, Method.CARD, Method.PHONE, Method.VBANK]
371371
// $0.method = Method.CARD
372372
$0.ux = UX.PG_DIALOG
373373
}
@@ -377,6 +377,7 @@ extension NativeController {
377377
// extra.offer_period = "1년치"
378378
// extra.quick_popup = 1;
379379
extra.quotas = [0, 2, 3] // 5만원 이상일 경우 할부 허용범위 설정 가능, (예제는 일시불, 2개월 할부, 3개월 할부 허용)
380+
extra.theme = "red"
380381
// extra.app_scheme = "bootpaysample://"; // 페이레터와 같은 특정 PG사의 경우 :// 값을 붙여야 할 수도 있습니다.
381382

382383

SwiftyBootpay.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
Pod::Spec.new do |s|
1111
s.name = 'SwiftyBootpay'
12-
s.version = '3.3.01'
12+
s.version = '3.3.02'
1313
s.summary = 'Bootpay PG Plugin For Swift'
1414

1515
# This description is used to generate tags and improve search results.

SwiftyBootpay/Classes/BootpayController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ extension BootpayController {
130130
// 필요한 PG는 팝업으로 띄운다
131131
var quick_popup = extra.quick_popup;
132132
if(quick_popup == -1 && payload.pg != "payapp" && payload.method == "card") {
133-
print("quick popup22")
133+
// print("quick popup22")
134134
quick_popup = 1;
135135
}
136136
if(quick_popup == 1) {

SwiftyBootpay/Classes/BootpayExtra.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ public class BootpayExtra: NSObject, BootpayParams, Mappable {
2525
@objc public var iosCloseButtonView: UIButton?
2626
@objc public var onestore = BootpayOneStore()
2727

28+
@objc public var theme = "purple" //통합 결제창 색상 지정 (purple, red, custom 지정 가능 )
29+
@objc public var custom_background = "" //theme가 custom인 경우 배경 색 지정 가능 ( ex: #f2f2f2 )
30+
@objc public var custom_font_color = "" //theme가 custom인 경우 폰트색 지정 가능 ( ex: #333333 )
31+
32+
2833
public override init() {}
2934
public required init?(map: Map) {
3035
}
@@ -46,6 +51,10 @@ public class BootpayExtra: NSObject, BootpayParams, Mappable {
4651
escrow <- map["escrow"]
4752
onestore <- map["onestore"]
4853
iosCloseButton <- map["iosCloseButton"]
54+
55+
theme <- map["theme"]
56+
custom_background <- map["custom_background"]
57+
custom_font_color <- map["custom_font_color"]
4958
}
5059

5160
public func getJson(pg: String) -> String {
@@ -65,6 +74,9 @@ public class BootpayExtra: NSObject, BootpayParams, Mappable {
6574
"locale:'\(locale)',",
6675
"disp_cash_result:'\(disp_cash_result)',",
6776
"escrow:'\(escrow)',",
77+
"theme:'\(theme)',",
78+
"custom_background:'\(custom_background)',",
79+
"custom_font_color:'\(custom_font_color)',",
6880
"iosCloseButton: \(iosCloseButton)",
6981
]
7082

0 commit comments

Comments
 (0)