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:
- Install Ruby.
- Install the Bundler gem and its dependencies.
- Download the sample backend app from github: https://github.com/affinipay/app-integration-example-ruby.
- Log in to the AffiniPay web application: https://secure.affinipay.com/login.
- 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.)
- 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.
Note: If you don’t see any partner OAuth applications, ask AffiniPay Support to create one for you.
- Set the Redirect URI to:
- 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"
- Start the server. Run:
- 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