The problem background
Refer to the documents provided on huawei’s official website to verify the purchase token in the payment result to verify the accuracy of the payment result, but the result always displays an error: ResponseCode 8, responseMessage ERROR_INVALID_PAYMENTTOKEN {responseCode 8, responseMessage ERROR_INVALID_PAYMENTTOKEN} {rootUrl} / applications/purchases/tokens/verify.
Problem analysis and solution
A careful review of the documentation reveals that you can troubleshoot and resolve this problem in the following two ways:
1. Error code 8 is returned: Consumption or confirmation failed because the item is not owned. Consumption and confirmation are made after the purchase is successful. This error will be reported if consumption or confirmation is made when the item is not owned. Make sure that the interface input parameters are correct.
For the error codes, refer to the document:
Developer.huawei.com/consumer/cn…
Interface 2. Check the URL in the address {rootUrl} / applications/purchases/tokens/verify whether it is right, rootUrl has a different URL in different sites, including the AppTouch site any site can choose the address of the theory, Huawei servers route between sites. However, if a non-AppTouch Token requests the URL of the AppTouch site, an error message is displayed, that is, this error code.
For details, see:
Developer.huawei.com/consumer/cn…
The original link: developer.huawei.com/consumer/cn…
Original author: Mayism