Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Quality/Performance] Enhance Wallet Page Error Messaging related to In App Purchases #3188

Open
sync-by-unito bot opened this issue Jan 24, 2024 · 2 comments

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Jan 24, 2024

Should be implemented in

  • capture cam
  • white labeled apps

[Wallet Page]

Currently when user perform in app purchase and if backend returns error during receipt validation user will get "Failed to Credits" toast notification no matter what was the error response.

It would be nice to enhance toast notification with more information such as reason.

Here are the error messages that can be returned by backend

{

"error": {

"type": "invalid_receipt",

"message": "Invalid purchase receipt"

},

"status_code": 400

}

{

"error": {

"type": "duplicate_receipt_id",

"message": "The receipt has already been used to get NUM points."

},

"status_code": 400

}

image.png

┆Issue is synchronized with this Asana task by Unito
┆Created By: Sam

Copy link
Author

sync-by-unito bot commented Jan 24, 2024

➤ Sam commented:

Olga where can I get list of

  • error.type
  • error.message

for Purchase NUM points ( https://dia-backend.numbersprotocol.io/api/v3/redoc/#operation/num_points_purchase ) endpoint

We will need that to show appropriate error message to user in en-US, zh-TW and Japanese.

Copy link
Author

sync-by-unito bot commented Jan 25, 2024

➤ Olga commented:

{

"error": {

"type": "not_authenticated",

"message": "Authentication credentials were not provided."

},

"status_code": 401

}

{

"error": {

"type": "permission_denied",

"message": "You do not have permission to perform this action."

},

"status_code": 403

}

{

"error": {

"type": "validation_error",

"message": "One or more fields does not match the requirement.",

"details": …

},

"status_code": 400

}

{

"error": {

"type": "duplicate_receipt_id",

"message": "The receipt has already been used to get NUM points."

},

"status_code": 400

}

{

"error": {

"type": "invalid_receipt",

"message": "Invalid purchase receipt"

},

"status_code": 400

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants