2017-07-27 70 views
2

從我的控制,我試圖做一個POST請求https://test.adyen.com/hpp/select.shtml但我不斷收到此錯誤錯誤:皮膚空不存在

Error: Skin null does not exist 

這是我的代碼部分

$paramsRequest = array (
    'merchantReference' => 'reference', 
    'paymentAmount' => 10, 
    'currencyCode' => 'EUR', 
    'shipBeforeDate' => '2017-11-29T13:42:40+1:00', 
    'skinCode' => 'f8My4RJC', 
    'merchantAccount' => 'TestNL076', 
    'sessionValidity' => '2017-11-29T13:42:40+1:00', 
    'merchantReturnData' => 'string', 
    'shopperEmail' => '[email protected]', 
); 


$hcma = '8382E2...'; 

$paramsRequest['merchantSig'] = Util::calculateSha256Signature($hcma, $paramsRequest); 

return $this->handlePostRequest($paramsRequest, 'https://test.adyen.com/hpp/select.shtml'); 

並處理請求

protected function handlePostRequest($data, $url) 
{ 
    $ch = curl_init(); 

    curl_setopt($ch, CURLOPT_URL, $url); 

    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); 

    curl_setopt($ch, CURLOPT_HEADER, false); 

    curl_setopt($ch, CURLOPT_USERPWD, 'admin' . ":" . 'password'); 

    curl_setopt($ch, CURLOPT_POST, count($data)); 

    curl_setopt($ch, CURLOPT_POSTFIELDS,json_encode($data)); 

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 

    $result = curl_exec($ch); 

    $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); 

    curl_close($ch); 

    return $result; 
} 

回答

0

您是否正在嘗試執行可用付款的查找?如果是這樣,請使用終點。

https://test.adyen.com/hpp/directory.shtml 

否則,當你希望他們能夠在輸入信息或發送給他們的銀行select.shtml一個端點重定向購物者的瀏覽器。這裏是adyen的鏈接local payment method docs.