Facebook Credits Invalid State Transition Error

587 views Asked by At

I am using Github sample code for the Facebook Credits (callback.php and index.php) but its giving me the below error.. anybody have any solution???

"Order::update_order called with invalid state transition:3 -> 0"

Thanks..

1

There are 1 answers

0
Hawk On

Hard to answer without seeing the code you're using, but the response you send should look like this:

{
 "method": "payments_status_update", 
 "content": {
        "order_id": ORDER_ID, 
        "status": "settled"
        }
}

ORDER_ID should be replaced by the order id sent from fB with the request.

There were incorrect examples out there that showed:

{
 "method": "payments_status_update", 
 "content": [{
        "order_id": ORDER_ID, 
        "status": "settled"
        }]
}

but the second one doesn't work. Check to make sure you're not sending content as an array.