Skip to content

Instantly share code, notes, and snippets.

Embed
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
<?php
$ch = curl_init();
$post = array(
'pay_amount' => 100,
'description' => 'Test Betaling',
'return_url' => 'http://mijndomein.nl?unieke_id=ABC123', // 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 = 'https://accountnaam.moneymedic.eu/kassa';
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}.moneymedic.eu/kassa/{UNIQUE_TOKEN}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.