Skip to content

Commit

Permalink
fix: Disable the close button for Klarna during payment processing (#…
Browse files Browse the repository at this point in the history
…1058)

Disable the close button for Klarna during payment processing

Co-authored-by: Boris Nikolic <[email protected]>
  • Loading branch information
borisprimer and BorisNikolic authored Dec 11, 2024
1 parent 67100b7 commit 8928608
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Debug App/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ PODS:
- PrimerIPay88MYSDK (0.1.7)
- PrimerKlarnaSDK (1.1.1)
- PrimerNolPaySDK (1.0.1)
- PrimerSDK (2.32.0):
- PrimerSDK/Core (= 2.32.0)
- PrimerSDK/Core (2.32.0)
- PrimerSDK (2.32.1):
- PrimerSDK/Core (= 2.32.1)
- PrimerSDK/Core (2.32.1)
- PrimerStripeSDK (1.0.0)

DEPENDENCIES:
Expand Down Expand Up @@ -37,9 +37,9 @@ SPEC CHECKSUMS:
PrimerIPay88MYSDK: 436ee0be7e2c97e4e81456ccddee20175e9e3c4d
PrimerKlarnaSDK: 564105170cc7b467bf95c31851813ea41c468f8b
PrimerNolPaySDK: 08b140ed39b378a0b33b4f8746544a402175c0cc
PrimerSDK: db06e6553747bdadf8a8ca276d556745af38bba3
PrimerSDK: 41eb9f627fa189f3edafdb18ea2a671d4403b3e2
PrimerStripeSDK: c37d4e7c1b5256d67d4890c4cc4b38ddc9427489

PODFILE CHECKSUM: fa17ead44d40b0b09abc2f30a5cc3d8aefe389e1

COCOAPODS: 1.15.2
COCOAPODS: 1.16.2
16 changes: 16 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"object": {
"pins": [
{
"package": "Primer3DS",
"repositoryURL": "https://github.com/primer-io/primer-sdk-3ds-ios",
"state": {
"branch": null,
"revision": "7d2c9ac8825a4459034a1416012cae61761543fd",
"version": "2.4.1"
}
}
]
},
"version": 1
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,35 @@ class KlarnaTokenizationViewModel: PaymentMethodTokenizationViewModel {
try tokenizationComponent.validate()
}

override func start() {

checkoutEventsNotifierModule.didStartTokenization = {
DispatchQueue.main.async {
self.uiManager.primerRootViewController?.enableUserInteraction(false)
}
}

checkoutEventsNotifierModule.didFinishTokenization = {
DispatchQueue.main.async {
self.uiManager.primerRootViewController?.enableUserInteraction(true)
}
}

didStartPayment = {
DispatchQueue.main.async {
self.uiManager.primerRootViewController?.enableUserInteraction(false)
}
}

didFinishPayment = { _ in
DispatchQueue.main.async {
self.uiManager.primerRootViewController?.enableUserInteraction(true)
}
}

super.start()
}

override func performPreTokenizationSteps() -> Promise<Void> {
let event = Analytics.Event.ui(
action: .click,
Expand Down

0 comments on commit 8928608

Please sign in to comment.