Controls the title, branding, and button label displayed in the payment sheet. Pass an instance to the configuration parameter of PaymentAction.
All properties are optional. Omit any you don't need and the default value will be used.
Configuration shape
Configuration(
title: String?,
branding: Branding?,
buttonTitle: String?,
enableCardScanning: Bool = false
)| Property | Type | Default | Description |
|---|---|---|---|
title | String? | "Card Entry" | Title displayed at the top of the payment sheet navigation bar. |
branding | Branding? | Finix default logo | Logo image and label shown in the form header. See Branding. |
buttonTitle | String? | "Tokenize" | Label for the submit button. |
enableCardScanning | Bool | false | When true, offers a camera-based card scanning option on supported devices. |
Branding shape
Branding(
image: UIImage?,
title: String?
)| Property | Type | Default | Description |
|---|---|---|---|
image | UIImage? | Finix default logo | Logo image displayed in the form header. |
title | String? | "Daphne's Corner" | Label displayed next to the logo image. |
image / title
image sets the logo image displayed in the form header. title sets the label displayed next to it.
let branding = Branding(
image: UIImage(named: "MyLogo"),
title: "My Company"
)title / buttonTitle
Override the default sheet title and submit button label with your own strings. Common overrides: "Pay Now", "Confirm", "Submit".
Full example
Pass a Configuration instance to PaymentAction via the configuration parameter.
Configuration(
title: title,
branding: branding,
buttonTitle: buttonTitle,
enableCardScanning: enableCardScanning
)
Branding(
image: UIImage(named: "MyLogo"),
title: "My Company"
)
let branding = Branding(
image: UIImage(named: "MyLogo"),
title: "My Company"
)
Configuration(
title: "Card Entry",
buttonTitle: "Pay Now"
)
let branding = Branding(
image: UIImage(named: "MyLogo"),
title: "My Company"
)
let config = Configuration(
title: "Card Entry",
branding: branding,
buttonTitle: "Pay Now",
enableCardScanning: true
)
let paymentAction = PaymentAction(
credentials: credentials,
delegate: self,
configuration: config
)