0

I am working on writing a call back for my facebook app. Everything was working fine until some days back. After some digging around I found that the callback url was being called twice with the function name as 'payment_get_items'. My first thought was that I was calling the payment dialog twice. However, on debugging I found out that my javascript function that brings up the payment dialog was being called only once. Does anyone know why this is happening?

2 Answers2

0

They do the call twice for order complete as well (much worse!) , I've had to implement a code fix, i put the order 'in processing' as soon as the first call hits, and check for that before processing, so effectively ignoring the second call.

Monsters X
  • 2,638
  • 1
  • 19
  • 21
0

I am quoting a note from Facebook official documentation below. Ignore one with status=settled, and just process one with status=placed

Note: Facebook sometimes issues a second payments_status_update request with the settled status. Developers should ignore this request. Facebook will be removing this second request on March 1, 2012 so developers should not depend on it.

https://developers.facebook.com/docs/payments/callback/

Yoshi
  • 91
  • 3