【发布时间】:2011-11-19 00:00:15
【问题描述】:
我从 facebook 学分中实现了示例,并创建了一个测试应用程序,在回调 URL 中添加了 callback.php,正确放置了我的密钥。但我收到此错误:
Sorry, but we're having trouble processing your payment. You have not been charged for this transaction. Please try again.
我正在尝试创建一些具有不同货币价值的按钮。喜欢:
Click to get 100 credits
Click to get 1000 credits
如果我使用这个通用代码,我可以很好地进入付款窗口,但我看不到我的产品,我只能从已经制作的预设中选择:
function buyMore(){
// calling the API ...
var obj = {
app_id: 'xxxxxxxxxxxxxxxxxxxxx',
method: 'pay',
order_info: n,
purchase_type: 'item',
credits_purchase: true
};
为了向用户显示我的货币预设,我认为我需要将不同的值传递给函数:
<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'
};
// calling the API ...
var obj = {
app_id: '153230661424821',
method: 'pay',
order_info: order_info,
purchase_type: 'item'
};
}
不确定我是否正确。
谁能把我推向正确的方向?
【问题讨论】:
-
即使我也面临同样的问题。我试图调试代码,突然间它开始弹出对话框,过了一段时间它开始给出同样的错误。所以我不确定发生了什么
标签: php javascript facebook credits