TransactionOptions
public class TransactionOptions: NSObject
This class can be used to specify miscellaneous options related to the transaction.
-
Your unique URL scheme to be used by other apps (e.g. Twint) to return to the merchant app.
Declaration
Swift
public var appCallbackScheme: String?
-
Specify the
ApplePayConfig
object here. This is mandatory for Apple Pay transactions.Declaration
Swift
public var applePayConfig: ApplePayConfig?
-
Specify the
BoncardConfig
object here. This can be used to configure how thePaymentMethodType.Boncard
payment method type should be displayed in the SDK. If not specified, a default value will be used.Declaration
Swift
public var boncardConfig: BoncardConfig?
-
Use this setting to choose which label to display for the card option in the payment method selection: “Credit card”, “Debit card”, or “Credit or debit card”. The latter is used by default.
Declaration
Swift
public var cardLabelType = CardLabelType.creditOrDebitCard
-
Use this to change the name of the Klarna payment method, to e.g. “Lastschrift”.
If not specified, the name is “Klarna”.
Declaration
Swift
public var customKlarnaPaymentMethodName: String?
-
Use this setting to display or hide critical and transaction errors.
Declaration
Swift
public var suppressCriticalErrorDialog = false
-
Use this setting to switch from production to sandbox. If not specified, the SDK will call the Datatrans production environment.
Declaration
Swift
public var testing = false
-
In case you use Twint and can’t list all Twint app schemes from “twint-issuer1” to “twint-issuer39” under
LSApplicationQueriesSchemes
, use this setting to specify the highest one you do list.The default value is 39. Listing “twint-extended” is always required to use Twint.
Important
ReducingtwintMaxIssuerNumber
has an adverse effect on the user experience.Declaration
Swift
public var twintMaxIssuerNumber = 39
-
Whether secure connections to datatrans servers require a certificate chain signed with a specific CA private key. The device’s trust settings are explicitly ignored, i.e. custom installed/white-listed certificates and/or CAs will not work.
Please be advised that enabling this option will break your app in many corporate networks with anti-malware/-theft/-espionage SSL proxying.
Declaration
Swift
public var useCertificatePinning = false
-
Sometimes, apps display a loading animation before starting the SDK. You can set the
customInitialLoaderDelegate
option if you want to keep showing this animation instead of the SDK’s loader during initial SDK network requests.Important
Your loader must be visible before starting the SDK. Be aware that the SDK blocks user input. Your loading screen can not have a cancel button or give the impression that users can still interact with the UI.Declaration
Swift
public weak var customInitialLoaderDelegate: InitialLoaderDelegate?
-
Mode to control when DCC is presented for saved card payments (alias/tokenized payments).
See moreDeclaration
Swift
public enum DCCShowMode: Int
-
Option to control when the DCC (Dynamic Currency Conversion) screen is presented for payments with saved cards (alias/tokenized payments). The default is
DCCShowMode.always
, meaning DCC is always shown when available. SeeDCCShowMode
for additional information.Declaration
Swift
public var savedCardDCCShowMode: DCCShowMode = .always