Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
In dit voorbeeld wordt er veilig in PHP een Kassa URL gegenereerd, zodat deze gegevens niet te zien zijn in de broncode
$ch = curl_init();
$post = array(
'pay_amount' => 100,
'description' => 'Test Betaling',
'return_url' => '', // secret return URL
'kassa_secret' => 'MIJN_KASSA_SECRET', // you can find this in the advanced section
'no_redirect' => 1 // doesn't redirect to the kassa page, but prints the URL instead
$url = '';
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$kassa_url = curl_exec($ch); // use this URL in your HTML form
echo $kassa_url; // prints: https://{accountname}{UNIQUE_TOKEN}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment