let accountNumberString = "1234567890123456"
let jwtString = "INSERT_YOUR_JWT_HERE"
session.setup(jwtString: jwtString,
account: accountNumberString,
completed: { (consumerSessionId: String) in
//
// You may have your Submit button disabled on page load. Once you are setup
// for CCA, you may then enable it. This will prevent users from submitting
// their order before CCA is ready.
//
}) { (validateResponse: CardinalResponse) in
// Handle failed setup
// If there was an error with setup, cardinal will call this function with
// validate response and empty serverJWT
} |