drfcaw7460 2013-12-10 14:28
浏览 31

PayOne界面不接受我的HASH值

I have been trying to get the PayOne FrontEnd interface to accept the hash value from my request, to absolutely no avail. I have a support ticket open but need a solution relatively quick, so here I am.

The error returned is "Hashwert Nicht Korrekt" (Hash value incorrect).

Here is my code:

$request="authorization"; 
$portalid = 2017373; 
$aid = 24413; 
$key = "secretkeychangedforsecuritoyreasons"; // Key (configurable in the payment portal) 

$id[1]=  "PART_100"; 
$pr[1]=  2000;
$no[1] = 1; 
$de[1] = "Registration Fee";
$va[1] = 19; 
$amount = round($pr[1]*$no[1]);
$clearingtype = "cc";
$mode = "test";
$currency="EUR"; 
$reference="24393"; 
$customerid="24393"; 

    $hash = md5(
             $aid . 
             $amount . 
             $currency . 
             $customerid .
             $clearingtype . 
             $de[1] . 
             $id[1] . 
             $mode .
             $no[1] . 
             $portalid . 
             $pr[1] . 
             $reference . 
             $request . 
             $va[1] . 
             $key
     ); 

$url="https://secure.pay1.de/frontend/?request=" . $request . 
"&aid=" . $aid . 
"&mode=" . $mode .
"&clearingtype=" . $clearingtype .
"&portalid=" . $portalid . 
"&customerid=" . $customerid . 
"&currency=" . $currency . 
"&amount=" . $amount . 
"&reference=" . $reference . 
"&id[1]=" . $id[1] . 
"&pr[1]=" . $pr[1] . 
"&no[1]=" . $no[1] . 
"&de[1]=" . $de[1] . 
"&va[1]=" . $va[1] . 
"&hash=" . $hash; 

header("Location: $url");

I have checked and re checked the docs and can find no errors in the way I am puttign it together. If I change single values like portalid, etc. it throws the appropriate error.

Any help would be appreciated.

  • 写回答

2条回答 默认 最新

  • duanjiong2021 2014-07-09 06:16
    关注

    I found the following section in the client-api-documentation:

    Attention: PAYONE Platform expects the calculated hash value converted to lower case; e.g. 87dbc7c369b85b7a699adff1a2b27bab

    Maybe you have some capital letter in your hash? I do an ".toLowerCase()" (in Java) on the encrypted hash.

    One other option: you forgot some parameters. on the first look i can't see the following: mid

    评论

报告相同问题?