Created
November 11, 2010 13:18
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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