Met PHP curl probeer ik de betaalmethode te krijgen, maar het lijkt niet te werken:
Hij blijft aangeven:
“{"status":"FALSE","error":"Invalid Method Call to getService. Missing argument(s): serviceId."}”
Is er voor de API koppeling geen php mogelijk? of moet dit per se via de SDK?
uitgaande van: https://docs.pay.nl/developers?shell#services
$headers = [
"Authorization: Basic xxxxxxxxxxxxxxxxxxxx",
"cache-control: no-cache",
"Content-Type: application/x-www-form-urlencode",
];
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://rest-api.pay.nl/v16/Transaction/getService/json',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => array('serviceId' => 'SL-xxxxxxx')
));
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($curl);
$errno = curl_errno($curl);
curl_close($curl);
print_r($response);