【问题标题】:DIBS recurring payment, no error message, not working at allDIBS定期付款,没有错误消息,根本不工作
【发布时间】:2013-02-02 14:00:30
【问题描述】:

我正在使用以下代码来工作,但它不工作

  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");
  }

这是代码输出 大批 ( [原因] => 2 [状态] => 拒绝 ) 授权失败

    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/

【问题讨论】:

    标签: php payment-gateway credit-card recurring-billing dibs


    【解决方案1】:

    我联系了技术支持并得到以下答复:

    您遇到的问题是由于您试图向我们发送真实的卡号(测试或实时)。这种形式的集成需要您的系统获得 PCI 认证。

    大多数客户使用所谓的托管解决方案,您可以使用我们的付款窗口。有关文档,请参阅 tech.dibs.dk。

    【讨论】:

      猜你喜欢
      • 2013-06-09
      • 2014-09-04
      • 1970-01-01
      • 2014-07-25
      • 2018-06-30
      • 2013-03-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多