Testing IAP

As the sandbox environment is still under development, testing the SDK integration on your app can be done using the production environment with a certain configuration.

On-chain (pay in crypto) VS Off-chain (pay with credit card)

With the release of the AppCoins Wallet version v1.3.0.2 you are able to choose the payment method that best suits your need. Available options:

  • AppCoins - This is the usual On-chain method. It uses Ethereum and AppCoins to make a purchase
  • Credit Card
  • Paypal
  • AppCoins Credits

How to test

Pre-Requirements:

  1. Install the AppCoins BDS Wallet from Google Play or Aptoide.
  2. Open the AppCoins BDS Wallet and create a new wallet.
  3. Install the APK that has the SDK integrated.

Testing the On-Chain Flow (pay in crypto)

Requirements: In the AppCoins BDS Wallet, import your wallet or create a new one and top up with the necessary Ether (ETH) and APPC. On-chain payments are done using AppCoins (APPC) and Ether (ETH) to pay the fee. To know how to buy APPC or Ether, check the tutorial “Easy Tutorial on how to buy AppCoins”.

Steps:

  1. Open your app and choose to make an in-app purchase and a wallet dialog will appear for you to confirm the cost.
360

On-chain buy dialog

  1. Press Buy on the dialog and wait for the purchase to finish.
360

On-chain purchase progress

360

Item received

  1. Confirm your purchase on the AppCoins BDS Wallet or at APPC Explorer website. If you choose to use APPC Explorer, you can use the search bar on the top right corner to search for your wallet address. You can refer to the reference images below with an example of a search result both for the AppCoins BDS Wallet and APPC Explorer.
1180

APPC Explorer Search bar

1119

Search results

1120

Transaction details in APPC Explorer

360

AppCoins BDS Wallet confirmation

  1. Check your balance in your Catappult Account here under the "Current deposit address".

Testing the Off-Chain Flow (pay with credit card)

Requirements:

Create a wallet in the AppCoins BDS Wallet. This wallet must not have ETH or APPC.

Steps:

  1. Open your app and choose to make an in-app purchase and a wallet dialog will appear for you to confirm the cost.
  2. Press Buy on the dialog and you will be presented with a form to introduce your credit card details.
360

Off-chain buy dialog

  1. Fill in the form and confirm your purchase by pressing BUY.
360

Credit card form

  1. Wait for the process to finish (this will take about 2 seconds) and you'll be directed to your app once again, now with the item you just bought.
360

Off-chain item received

Confirm your purchase on the AppCoins BDS Wallet or at APPC Explorer website. If you choose to use APPC Explorer, you can use the search bar on the top right corner to search for your wallet address. You can refer to the reference images below with an example of a search result, both for the AppCoins BDS Wallet and APPC Explorer.

1180

APPC Explorer Search bar

1119

Search results

1120

Transaction details in APPC Explorer

360

AppCoins BDS Wallet confirmation

In APPC Explorer, clicking in the TxID will give you the details of that specific transaction where you can click on “Verify Transaction” and confirm the root hash of the Merkle Tree along with the block number where the transaction was included in the Ethereum main net. By verifying this transaction you can confirm that the SDK was correctly integrated with your app.