I'm trying to integrate Payer Promotions for our facebook game. I put a link to initiate payer promotion with js-sdk and created a callback function. using this sample:
<!-- Simple unit for Payer Promotion (payer_promotion)
Determine visibility of the unit from the above eligibility API -->
<button onclick="payer_promotion();">Payer Promotion</button>
<script>
// On load, the user hasn't clicked on the payer_promotion unit
var has_clicked = false;
var dialog_window;
function payer_promotion() {
if (!has_clicked) {
// If first click, open payer_promotion dialog
var obj = {
method: 'fbpromotion',
display: 'popup',
quantity: 10,
product: 'http://currency.object.url'
};
FB.ui(obj, function(){
// call back to your server to see if user's balance changed
});
// Mark unit as clicked by user
has_clicked = true;
} else {
// For subsequent clicks, alert user
alert("Payer Promotion already clicked!");
}
}
</script>
So everything works expected with my payment tester account and i claimed my free promotion... or so facebook says. once the transactions is completed and user closes the new popup facebook opened, I'm left with just a callback with no arguments and no idea whatever happened between facebook and the user. callback function has "// call back to your server to see if user's balance changed" comment but since facebook changed to local currency I'm doing payment processing locally with order_id (not facebook->my server it used to be). So if I don't get order_id I have no means to figure out if I should process the promotion or not. The question is, am I missing something? is there a way to figure out if the promotion succeeded or not?