Facebook Local Currency Payment error

2019-08-12 12:34发布

问题:

While implementing local currency payment i encounter the following error :

Sorry, but we're having trouble processing your payment. You have not been charged for this transaction. Please try again.

and after click the close button, i notice the callback return the following error:

Object {error_code: 1383003, error_message: "Account id missing. sender: 160028640868641 receiver: 0"} 

Below is the js code:

FB.ui({
                  method: 'pay',
                  action: 'purchaseitem',
                  product: productlink,
                   request_id: requestID,
                    quantity: 2
                },
                callbackPurchase
            );

og:product object:

<!DOCTYPE html>
<html>
 <head prefix=
    "og: http://ogp.me/ns# 
     fb: http://ogp.me/ns/fb# 
     product: http://ogp.me/ns/product#">
    <meta property="og:type"                   content="og:product" />
    <meta property="og:title"                  content="IE Coupon" />
    <meta property="og:plural_title"           content="IE Coupons" />
    <meta property="og:image"                  content="https://some-url/clientPage/og/trollface.png" />
    <meta property="og:description"            content="Interactive coupons" />
    <meta property="og:url"                    content="https://some-url/clientPage/og/ie.php" />
    <meta property="product:price:amount"      content="0.30"/>
    <meta property="product:price:currency"    content="USD"/>
  </head>
</html>

回答1:

I just had this same problem. You probably just forgot to enable payments in your app settings. Just go into the payments tab of settings and select your company, or enter new company info if this is your first time working with payments.

Once you enable payments, you have to also put your facebook ID into the third box of testers so that you can test without having to actually pay for things.