3

从我的控制器,我试图发出一个发布请求,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' => 'shopper@gmail.com',
);


$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;
}
4

1 回答 1

1

您是否正在尝试查找可用付款?如果是这样,请使用终点。

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

否则,select.shtml当您希望他们输入信息或将他们发送到他们的银行时,该端点将重定向购物者的浏览器。这是 adyen 的本地支付方式文档的链接。

于 2017-07-27T20:52:49.130 回答