Recently i started to convert my payment methods in my canvas app to Facebook credits.
The thing is that i have some validation and verification done on my backend and i must return an error back to the user.
I saw the Facebook's PHP callback implementation (pretty ugly btw lol ... compared to the other APIs) and i saw a comment stating that there is some kind of error and comment support although i can't seem to find how to return human readable error from my app back to the user.
Here is how my thing goes
- User finds a needed extra and press the buy button
- I call the proper FBJS method
- Facebook asks my callback for item information and i return it.. price image name desc etc etc
- Then Facebook sends the first payments_status_update which is "placed"
- This is where i check for any errors. If i find something i want to print it out back to the user with refunded or canceled status
Honestly, I've tried everything but i just can't get it to use my comment instead of some silly error message. Some of my extras require certain buildings to be built before being bought but i can't notify the user :/ I don't want to make an AJAX request to my php backend to find whether this user can buy this extra or cannot and if he can then i call the fbjs proper methods. This is silly. Is there someway to evade it ?