簡體   English   中英

DIBS定期付款,沒有錯誤消息,根本不起作用

[英]DIBS recurring payment, no error message, not working at all

我正在使用以下代碼正常工作,但無法正常工作

  require('DIBSFunctions.php');

     //Define input variables (here simply static variables)
  $Merchant     = "123456";
  $OrderID      = "AHJ798123AH-BH";
  $Currency     = "208"; //DKK
  $Amount       = "30000"; //In smallest possible unit 30000 Øre = DKK 300 
  $CardNo       = "5019100000000000"; //DIBS test Dankort values
  $ExpMon       = "06"; //DIBS test Dankort value
  $ExpYear      = "13"; //DIBS test Dankort value
  $CVC          = "684"; //DIBS test Dankort value
  $MD5['K1']    = "~.(S96%u|(UV,~ifxTt.DAKSNb&SKAHD"; //K1 and K2 MUST be gathered through
  $MD5['K2']    = "qJuH6vjXHLSDB*%¤&/hbnkjlBHGhjJKJ"; //ones DIBS admin-webinterface.

//Call function DIBSAuth to authorise payment
  $RES = DIBSAuth($Merchant,$Amount,$Currency,$CardNo,$ExpMon,$ExpYear,$CVC,$OrderID,$MD5);

  echo '<pre>';
  print_r($RES);


//Check the response (the DIBS API returns the variable transact on success)
  if ( $RES['transact'] != "" ) 
  {
    printf ("Authorisation successful! TransaktionID = %s",$RES['transact']);   

//Call function DIBSCapt to capture payment
    $RES2 = DIBSCapt($Merchant, $Amount, $RES['transact'], $OrderID);

    if ( $RES2['status'] == "ACCEPTED" ) 
    {
      printf ("Transaction completed");
    } else {
      printf ("Capture failed!");  
    }
  } else {
    printf ("Authorisation failed");
  }

這是代碼輸出Array([reason] => 2 [status] => DECLINED)授權失敗

    require('DIBSFunctions.php');

該文件包含用戶名和密碼,我正在提供。 例如

    function http_post($host, $path, $data, $auth="") {
        $auth['username']       = '123456';
        $auth['password']       = '987656656';
       //rest of the code
    }

如果有人想查看文件“ DIBSFunctions.php”,則可以從此處http://tech.dibspayment.com/toolbox/downloads/dibs_php_functions/下載。

我聯系技術支持並獲得以下答案:

您遇到的問題是由於您試圖向我們發送真實的卡號(測試或實時)而引起的。 這種集成形式要求您的系統具有PCI認證。

大多數客戶使用所謂的托管解決方案,您可以在其中使用我們的付款窗口。 請參考tech.dibs.dk以獲得文檔。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM