Skip to content

Commit

Permalink
callbackUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
vanshg committed Oct 18, 2023
1 parent 6ec9d76 commit 5f7cd81
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public struct EnhancedKycRequest: Codable {
dob: String? = nil,
phoneNumber: String? = nil,
bankCode: String? = nil,
callbackUrl: String? = SmileID.callbackUrl?.absoluteString ?? "",
callbackUrl: String? = SmileID.callbackUrl,
partnerParams: PartnerParams,
sourceSdk: String = "ios",
sourceSdkVersion: String = SmileID.version,
Expand Down
2 changes: 1 addition & 1 deletion Sources/SmileID/Classes/Networking/Models/PrepUpload.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Foundation
public struct PrepUploadRequest: Codable {
var partnerParams: PartnerParams
// Callback URL *must* be defined either within your Partner Portal or here
var callbackUrl: String? = SmileID.callbackUrl?.absoluteString ?? ""
var callbackUrl: String? = SmileID.callbackUrl
var partnerId = SmileID.config.partnerId
var sourceSdk = "ios"
var sourceSdkVersion = SmileID.version
Expand Down
4 changes: 2 additions & 2 deletions Sources/SmileID/Classes/SmileID.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class SmileID {

public private(set) static var config: Config!
public private(set) static var useSandbox = true
public private(set) static var callbackUrl: URL?
public private(set) static var callbackUrl: String = ""
internal static var apiKey: String?
public private(set) static var theme: SmileIdTheme = DefaultTheme()
internal private(set) static var localizableStrings: SmileIDLocalizableStrings?
Expand Down Expand Up @@ -69,7 +69,7 @@ public class SmileID {
/// from the partner portal will be used.
/// - Parameter url: A valid URL pointing to your server
public class func setCallbackUrl(url: URL?) {
SmileID.callbackUrl = url
SmileID.callbackUrl = url?.absoluteString ?? ""
}

/// Apply theme
Expand Down

0 comments on commit 5f7cd81

Please sign in to comment.