When it comes to swift app development and integrating mobile payment solutions into your apps, having access to sample applications can be incredibly helpful. In this article, we'll explore how to use 8am's sample backend and mobile apps to streamline the integration process.

Setting Up the Sample Backend App

To get started with the sample backend app, you'll need to follow these steps:

  • Install Ruby on your computer.
  • Use Bundler to install its dependencies.
  • Download the sample backend app from GitHub: [https://github.com/affinipay/app-integration-example-ruby](https://github.com/affinipay/app-integration-example-ruby).
  • Log in to the 8am web application at [https://secure.affinipay.com/login](https://secure.affinipay.com/login) using your credentials.
  • In the web application, navigate to the "Developers" section by clicking on your name in the top-right corner and selecting this option (available only to users with an Administrator or Developer role, as well as merchant owners).
  • Locate the partner OAuth application you want to use for the sample backend app and click "Edit".
  • Set the Redirect URI to http://127.0.0.1:9292/callback.
  • Copy the OAuth Client ID and OAuth Secret into the env.rb file that you downloaded with the rest of the sample backend app files.
  • Update the env.rb file by adding the following lines:

`ruby

ENV['OAUTH2_CLIENT_ID'] = "129477f..."

ENV['OAUTH2_CLIENT_SECRET'] = "c1eec90..."

ENV['OAUTH2_CLIENT_REDIRECT_URI'] = "http://127.0.0.1:9292/callback"

`

  • Start the server by running rackup config.ru.
  • Open the index page to begin testing your sample backend app.

Leveraging the Sample Mobile App

The sample mobile apps for Android and iOS provide a comprehensive reference point for integrating the 8am Payment Platform into your own mobile applications. To access these samples, visit [https://github.com/affinipay/mobile-sdk-examples](https://github.com/affinipay/mobile-sdk-examples).

By using these sample apps as a starting point, you can quickly get up and running with swift app development and 8am payment integration. Whether you're building a new mobile application or looking to enhance an existing one, having access to reliable samples can help streamline the development process.

Unlocking Swift App Development: A Guide to Mobile SDK Integration

This article has demonstrated how to set up and use 8am's sample backend and mobile apps for swift app development. By following these steps and leveraging the resources provided, you'll be well on your way to successfully integrating payments into your mobile applications.