Skip to content

Commit 39384b0

Browse files
committed
Bootpay.confirm(data) -> Bootpay.transacionConfirm() 으로 수정
1 parent d7011db commit 39384b0

7 files changed

Lines changed: 33 additions & 23 deletions

File tree

Bootpay.podspec

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

99
Pod::Spec.new do |s|
1010
s.name = 'Bootpay'
11-
s.version = '4.0.1'
11+
s.version = '4.0.2'
1212
s.summary = 'Bootpay에서 지원하는 공식 Swift 라이브러리 입니다. ios 9 이상부터 사용가능합니다.'
1313

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

Bootpay/Classes/config/BootpayBuildConfig.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ public typealias BTViewController = UIViewController
1818

1919
struct BootpayBuildConfig {
2020
static let DEBUG = false
21-
static let VERSION = "4.0.1"
21+
static let VERSION = "4.0.2"
2222
}

Bootpay/Classes/core/Bootpay.swift

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,13 @@ import WebKit
116116

117117
#endif
118118

119-
@objc(confirm:)
120-
public static func confirm(data: [String: Any]) {
119+
@objc(transactionConfirm)
120+
public static func transactionConfirm() {
121121
if let webView = shared.webview {
122-
let json = BootpayConstant.dicToJsonString(data).replace(target: "'", withString: "\\'")
122+
// let json = BootpayConstant.dicToJsonString(data).replace(target: "'", withString: "\\'")
123123

124124
let script = [
125-
"window.Bootpay.confirm(\(json))",
125+
"window.Bootpay.confirm()",
126126
".then( function (res) {",
127127
BootpayConstant.confirm(),
128128
BootpayConstant.issued(),
@@ -164,15 +164,17 @@ import WebKit
164164
}
165165

166166

167-
public static func goConfirm(_ data: [String : Any]) {
168-
if let sharedConfirm = shared.confirm {
169-
if(sharedConfirm(data)) {
170-
confirm(data: data)
171-
} else {
172-
removePaymentWindow()
173-
}
174-
}
175-
}
167+
// public static func goConfirm(_ data: [String : Any]) {
168+
// if let sharedConfirm = shared.confirm {
169+
// if(sharedConfirm(data)) {
170+
// transactionConfirm()
171+
//// (data: data)
172+
// }
173+
//// else {
174+
//// removePaymentWindow()
175+
//// }
176+
// }
177+
// }
176178
}
177179

178180
extension Bootpay {

Bootpay/Classes/webview/BootpayWebView.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ import WebKit
120120
webview.goBack()
121121
}
122122

123-
@objc public func confirm(data: [String: Any]) {
124-
Bootpay.confirm(data: data)
123+
@objc public func transactionConfirm() {
124+
Bootpay.transactionConfirm()
125125
}
126126

127127
@objc public func removePaymentWindow() {
@@ -237,10 +237,11 @@ extension BootpayWebView: WKNavigationDelegate, WKUIDelegate, WKScriptMessageHan
237237
} else if event == "confirm" {
238238
if let confirm = Bootpay.shared.confirm {
239239
if(confirm(body)) {
240-
Bootpay.confirm(data: body)
241-
} else {
242-
Bootpay.removePaymentWindow()
240+
Bootpay.transactionConfirm()
243241
}
242+
// else {
243+
// Bootpay.removePaymentWindow()
244+
// }
244245
}
245246
} else if event == "done" {
246247
Bootpay.shared.done?(body)

Example/Bootpay/NativeController.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,9 @@ print("ios")
192192
}
193193
.onConfirm { data in
194194
print("-- confirm: \(data)")
195-
// return true //재고가 있어서 결제를 최종 승인하려 할 경우
196-
return false //재고가 없어서 결제를 승인하지 않을때
195+
return true //재고가 있어서 결제를 최종 승인하려 할 경우
196+
// Bootpay.transactionConfirm()
197+
// return false //재고가 없어서 결제를 승인하지 않을때
197198
}
198199
.onDone { data in
199200
print("-- done: \(data)")

Example/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 4.0.2
2+
3+
* Bootpay.confirm(data) -> Bootpay.transacionConfirm() 으로 수정
4+
5+
* confirm에서 return false 일 때 결제창 닫히는 버그 수정
6+
17
## 4.0.1
28

39
* bootpay bio 호환을 위한 필드 scope 변경

Example/Pods/Target Support Files/Bootpay/Bootpay-Info.plist

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)