Skip to content

Instantly share code, notes, and snippets.

@melvinmt
Created November 11, 2010 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save melvinmt/672486 to your computer and use it in GitHub Desktop.
Save melvinmt/672486 to your computer and use it in GitHub Desktop.
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