In-app Purchare

  • Setup for in-app purchases for iOS

  1. Complete an effective “Agreements, Tax, and Banking.”

  1. Set up a sandbox testing account in “Users and Roles.”

  1. Signed into an iOS device with a Sandbox account.
  2. Set up In-App Purchases Products:

Create a Product with Non-Consumable

 

Find a Course ID and Create a Product with the Course ID.

Click Save.

Click Ready to Submit.

  1. Enable “In-App Purchase” in Xcode “Capabilities” and in the Apple Developer -> “App ID” setting. Delete app / Restart device / Quit “store” related processes in Activity Monitor / Xcode Development Provisioning Profile -> Clean -> Build.
  • Setup for in app purchase android

  1. Create new AAB file for your application: https://reactnative.dev/docs/signed-apk-android#generating-the-release-aab
  1. Upload your AAB on Google Play. 
  2. Create Product for your appication (Product ID same Course ID)
  3. Add tester to testing for in-app purchase.
  • Setup Validate receipt  

1. Ios

  • Go to In App Purchase and create App-Specific Shared Secret.
  • Go to LearnPress Settings > In App Purchase and add for Shared Secret.

2. Android

  1. Open the Settings > Developer account menus and select API access
  2. Select Link to connect your Play account to a Google Developer Project
  3. Agree to the terms and conditions
  4. Create Service Account
  5. Select Create Service Account
  6. Create Service account key credentials
  7. Enter details for service account
  8. Download your JSON credential
  9. In Play Console, select Grant Access on the newly created service account
  10. Grant the following permissions:
  11. After this wait for 48 hours to allow Google to propagate all access rights for APIs.
  12. Open your JSON file download and copy content to LearnPress Setting > In App Purchases and enter to Service Account.

Read more: https://stackoverflow.com/questions/35127086/android-inapp-purchase-receipt-validation-google-play