Mobile SDK sample apps

AffiniPay has created sample backend and mobile apps that you can download and install to familiarize yourself with how the mobile SDK works.

Sample backend app

The sample backend app simulates a backend server integrated with the AffiniPay Payment Platform. You can use this sample backend app with the sample mobile app to see how transactions work or with your own mobile app for testing purposes, after you’ve integrated the mobile SDK.

To set up and use the sample backend app:

  1. Install Ruby.
  2. Install the Bundler gem and its dependencies.
  3. Download the sample backend app from github: https://github.com/affinipay/app-integration-example-ruby.
  4. Log in to the AffiniPay web application: https://secure.affinipay.com/login.
  5. In the web application, click your name in the top-right corner and click Developers. (This part of the web application is available only to users with the Administrator or Developer role and to the merchant owner.)

  6. The My Partner Applications section on the right lists your partner OAuth applications. Locate the partner OAuth application whose client ID and secret you want to retrieve and click Edit.
    app Note: If you don’t see any partner OAuth applications, ask AffiniPay Support to create one for you.
  7. Set the Redirect URI to: http://127.0.0.1:9292/callback
  8. 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.
     # env.rb
     ENV['OAUTH2_CLIENT_ID']           = "129477f..."
     ENV['OAUTH2_CLIENT_SECRET']       = "c1eec90..."
     ENV['OAUTH2_CLIENT_REDIRECT_URI'] = "http://127.0.0.1:9292/callback"
    
  9. Start the server. Run: rackup config.ru
  10. Open the index page.

Sample mobile app

The Android and iOS sample mobile apps include all the screens in the mobile SDK. Use these apps as a reference as you integrate the mobile SDK into your own mobile apps. Both apps are available from: https://github.com/affinipay/mobile-sdk-examples