Reputation: 21
I'm new to HMS and I'm trying to add IAP to an App.
I followed this documentation and I implemented the purchase of a product, but the App fails at the very beginning.
Just after the call to IapClient.isEnvReady(), it answers to the onFailureListener with StatusCode at 6003 (that is not a value present in OrderStatusCode class)
I'm testing it on a device with HMS Core 4.0.3.316 and AppGallery installed.
The App is linking to
com.huawei.hms:iap:4.0.2.300
Can someone give help to me?
What the StatusCode 6003 means and what can I do?
Thanks
Upvotes: 2
Views: 566
Reputation: 2035
Per HMS In-App Purchases FAQ, error code 6003 means inconsistent certificate fingerprint configurations, please double-check your configuration based on this doc:
For complete instructions, please refer to this doc -
(4. Configure the app signature.)
Upvotes: 0
Reputation: 96
To make it work in debug mode, just copy your kestore file to your app dir and add this to your App Level build.gradle:
signingConfigs {
release {
storeFile file("YOUR_KEYSTORE_FILE.jks")
keyAlias 'YOUR_KEY_ALIAS'
keyPassword 'password1'
storePassword 'password2'
v1SigningEnabled true
v2SigningEnabled true
}
}
buildTypes {
release {
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
signingConfig signingConfigs.release
debuggable true
}
}
The 6003 error is caused by inconsistent certificate fingerprint configurations.
Refer to https://developer.huawei.com/consumer/en/codelab/HMSPreparation/#0
Check the following items:
Ensure that the certificate fingerprint has been configured, and the certificate for packing the signature on the local client is the same as the certificate for configuring the fingerprint in AppGallery Connect.
Check the fingerprint entries in the certificate. It is recommended that you use a single entry.
If the 6003 error persists when you run the local client after the fingerprint is configured, the debug certificate is running by default. Clear the cache of HMS Core and run the client again.
Upvotes: 1