I am implementing an example from credits on facebook and building a test application by adding callback.php
to the callback.php
url, put your keys correctly. but I get this error:
Sorry, but we're having trouble processing your payment. You have not been charged for this transaction. Please try again.
I am trying to create several buttons with different monetary values. How:
Click to get 100 credits Click to get 1000 credits
If I use this common code, I get the payment window just fine, but I donβt see my products there, I can only choose from presets already made:
function buyMore(){ // calling the API ... var obj = { app_id: 'xxxxxxxxxxxxxxxxxxxxx', method: 'pay', order_info: n, purchase_type: 'item', credits_purchase: true };
To show the user my money presets, it seems to me that I need to pass different values ββto the function:
<p><a onclick="buyMore('100'); return false;">Buy More Credits 100</a></p> <p><a onclick="buyMore('1000'); return false;">Buy More Credits 1000</a></p> function buyMore(price) { var order_info = { "title":'title', "description":'description', "price":price, "image_url":'http://....img_url', "product_url":'http://....product_url' };
Not sure if I understood correctly.
Can someone push me in the right direction?
source share