Solved “PurchaseResponse.RequestStatus.FAILED”, While Amazon IAP Live test environment

Derrick
Derrick’s Development Story
1 min readJul 28, 2021

Currently I am making a billing library for apps to release on Amazon App store as AAR Format with integrated with Amazon IAP library in company.

After finished integrated work , while I was testing my library , I found weird situation and share how can I fixed the problem

Actually there are three ways to test an Amazon IAP Test

1. Sandbox test

2. Live app testing(LAT)

3. Release

https://developer.amazon.com/docs/in-app-purchasing/iap-testing-overview.html

Actually everything is fine with first Sandbox Test environment but

during the second stage , every-times tried to purchase it failed with below log

“PurchaseResponse.RequestStatus.FAILED”

https://developer.amazon.com/docs/in-app-purchasing/iap-implement-iap.html#responseobjects

After checked the official document there were a requirement

Note: R8 is now compatible with IAP, so you no longer need to disable R8. IAP is compatible with Android Gradle plugin version 3.6.0 or higher. Follow the steps below to use IAP with R8.

In the Android studio that makes the integrated library including the actual IAP Library, I disabled proguard and R8 option

Finally !!

It worked well :)

Below is the part where R8 and proguard are disabled in Android Studio.

AAR Library project build gradle

buildTypes {

release {

**minifyEnabled false**

proguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.pro’

}

}

gradle.propertys

android.enableR8=false

--

--

Derrick
Derrick’s Development Story

Trying to be an awesome software engineer who can help people and public welfare services😎 https://www.linkedin.com/in/sensational/