Error: Skin null does not exist

Viewed 497

From my controller, I'm trying to make a post request to https://test.adyen.com/hpp/select.shtml but I continue receiving this error

Error: Skin null does not exist

This is part of my code

$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' => 'shopper@gmail.com',
);


$hcma = '8382E2...';

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

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

and to handle the request

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;
}
1 Answers
Related