App Configuration for the Fast iOS SDK
Recommendation: Create Sandbox Account
Sign up for a Fast Sandbox account so that you can test your integration with test cards before going live.
If you need help at any point, contact Customer Success at [email protected].
In your AppDelegate's didFinishLaunchingWithOptions(...) method, configure the FastCheckout iOS SDK with your Fast App ID:
Fast APP ID
The Fast App ID (app_id) can be found in the Install section of your Fast Seller Dashboard. You can also retrieve your Sandbox App ID from the Sandbox Seller Dashboard.
Fast.shared.configure(appId: "YOUR_FAST_APP_ID")Add the Fast Checkout Button
On pages where you want the FastCheckoutButton to appear, generate the button and add it to your view hierarchy.
// Create and add the Fast Checkout Button
let button = Fast.shared.createFastCheckoutButton()
view.addSubview(button)
// Note: Don't forget to handle the tap action!
button.addTarget(self, action: #selector(invokeFastCheckout), for: .touchUpInside)
...
// define invokeFastCheckout
@objc func invokeFastCheckout() {
// Call into one of the overloads for the checkout function.
Fast.shared.checkout(...)
}Define invokeFastCheckout
The Fast Checkout button will not have an action installed by default. Instead you should define your own `invokeFastCheckout` function for the action that calls one of Fast's checkout functions.
More details about invoking Fast Checkout can be found here
Allow Users to Sign Out
// Sign out current user and clear cached credentials.
Fast.shared.reset()