Skip to content

Latest commit

 

History

History
87 lines (61 loc) · 4.25 KB

README.md

File metadata and controls

87 lines (61 loc) · 4.25 KB

Checkout.com Checkout.com

Flow for Mobile iOS SDK

BETA license GitHub release (latest by date)

Minimum Requirements

  • iOS 15
  • Xcode 16
  • Swift 6

Integration

For detailed integration steps, refer to our official documentation ↗️ . You can also explore our Sample Application for a practical implementation.

🔐 3DS authentication can be enabled by setting it to true during Configuration initialization.

 threeDS: .init(enabled: true, attemptN3D: true)

attemptN3D You can choose to automatically downgrade your payment to a non-3DS payment if there are any technical issues during the 3DS authentication process that would otherwise cause the payment to fail. To do this, set the attemptN3D field in your request to true and we'll automatically attempt to process the payment without 3DS authentication More info ↗️

Swift Package Manager

Swift Package Manager ↗️ integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies. It should work out of the box on latest Xcode projects since Xcode 11 and has had a lot of community support, seeing huge adoption over the recent years. This is our preferred distribution method for Frames iOS and is the easiest one to integrate, keep updated and build around.

If you've never used it before, get started with Apple's step by step guide into adding package dependencies ↗️ to your app

Setting Up the Sample App

  1. After cloning the repository, navigate to SampleApplication/SampleApplication/Configuration. You will find the following files:

    • env-example.xcconfig: A template file containing dummy environment variables, which is tracked in source control.

    • EnvironmentVars.stencil: A code generation template used by Sourcery ↗️

  2. Open a terminal and navigate to the repository’s root folder:

    cd path/to/repository
  3. Run the initialization script:

    bash .github/scripts/init-env-vars.sh
  4. Locate the newly created env.xcconfig file (excluded from version control) and update it with your Checkout.com public and private keys.

  5. Generate the required Swift environment variables:

    bash .github/scripts/codegen-env-vars.sh
  6. This script will generate EnvironmentVars.generated.swift, which will be used in the project.

  7. Open the Sample Application in Xcode and run it.

  8. After completing the setup, your configuration files should resemble the structure shown below:

⚠️ Important
The secret key is embedded in the Sample Application only for demonstration purposes. Never include a secret key in your production application. Instead, always use your backend API to generate a payment session securely.

Dependencies

Ensure the Sample Application includes the NetworkClient package dependency:

  • Repository: NetworkClient-iOS ↗️
  • Branch: main
    • Add NetworkClient-iOS to the application target using main branch.

    • Change CheckoutNetworkFakeClient target to None

Changelog

Find our CHANGELOG ↗️