Graph API 版本

/{payment-id}/dispute

用於解決任何付款異議。

讀取

您無法讀取此關係連線,請使用付款父物件上的 disputes 欄位。

發佈

您可以使用這個關係連線解決異議:

POST /v19.0/{payment-id}/dispute HTTP/1.1
Host: graph.facebook.com

reason=DENIED_REFUND
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->post(
    '/{payment-id}/dispute',
    array (
      'reason' => 'DENIED_REFUND',
    ),
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
Bundle params = new Bundle();
params.putString("reason", "DENIED_REFUND");
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{payment-id}/dispute",
    params,
    HttpMethod.POST,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
NSDictionary *params = @{
  @"reason": @"DENIED_REFUND",
};
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{payment-id}/dispute"
                                      parameters:params
                                      HTTPMethod:@"POST"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

權限

  • 必須取得應用程式存取權杖,才能為該應用程式解決任何異議。
  • 如果付款尚未引起異議,呼叫將傳回錯誤。

欄位

名稱 說明 類型

reason

解決此異議的原因。此為必填欄位。

enum{GRANTED_REPLACEMENT_ITEM, DENIED_REFUND, BANNED_USER}

回應

成功時,會出現以下內容:

{
  "success": true
}

否則,系統會傳回相關錯誤訊息。

刪除

您無法使用這個關係連線刪除。