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:
- Install the AppCoins BDS Wallet from Google Play or Aptoide.
- Open the AppCoins BDS Wallet and create a new wallet.
- 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:
- Open your app and choose to make an in-app purchase and a wallet dialog will appear for you to confirm the cost.
- Press Buy on the dialog and wait for the purchase to finish.
- 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.
- 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:
- Open your app and choose to make an in-app purchase and a wallet dialog will appear for you to confirm the cost.
- Press Buy on the dialog and you will be presented with a form to introduce your credit card details.
- Fill in the form and confirm your purchase by pressing BUY.
- 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.
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.
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.
Updated about 5 years ago