2

I'm implementing in app purchase functionality on a Flutter application with NodeJs backend server. I'm facing difficulties on validating the receipt. The purchase from Flutter app is successful on sandbox environment and I'm getting the receipt url returned. Sharing the local and server receipt responses as attachments. (They seems same though).

List of steps took to reproduce the issue:

  1. Implemented and tested in app purchase on Flutter application.
  2. Got the receipt response making an in app purchase.
  3. Sent the receipt to backend for validation.
  4. Try to Validate receipt data on backend. Sending the request body as follows
  5. Getting response {"error":{},"status":21002,"message":"The data in the receipt-data property was malformed."} when the data is sent base64 encoded and as string Getting response {"error":{},"status":498,"message":"Invalid Purchase Token"} when data is sent base64 encoded.

Expected Output I expected to get the receipt validated and receipt details

Output Received

  1. Received response {"error":{},"status":21002,"message":"The data in the receipt-data property was malformed."} when the data is sent base64 encoded and as string

  2. Received response {"error":{},"status":498,"message":"Invalid Purchase Token"} when data is sent base64 encoded.

0 Answers0