Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include('PaymentSettings.php');
- # Copyright (c) 2001-2006 element 5, (c) 2006 Digital River GmbH
- #
- # NOTE: in order work with HTTP headers you have to make sure
- # that '<?php' are really the first characters in your file
- # check for errors
- if ( 1 == 2 ) {
- # an error has occured
- # set the status code other than 200
- Header("HTTP/1.1 400 Bad Request");
- # present the error
- echo "BAD_INPUT\n";
- # nothing else to do
- exit;
- }
- # calculate the key
- $quantity = $_POST['QUANTITY'];
- $firstName = $_POST['FIRSTNAME'];
- $lastName = $_POST['LASTNAME'];
- $custEmail = $_POST['EMAIL'];
- $CompanyName = $_POST['RESELLER'];
- $AppName = $_POST['REG_NAME'];
- # enter your secret key generation code here
- // Client has successfully paid for the product
- debug_log('Creating product Information to send.',true);
- // This calls the function in PaymentSettings.php that
- // creates the product keys and send them to the user
- $key = SendPKeys($quantity, $custEmail, $firstName, $lastName, $CompanyName, $AppName);
- debug_log('paychecker finished.',true,true);
- # present the key
- # the key to be presented inline
- Header ('Content-Type: text/plain');
- # if your key is a binary use the following headers instead
- # set the mime type
- #Header ('Content-Type: application/octet-stream');
- # set the filename for the binary key. Replace 'key.bin' by a filename you want
- #Header ('Content-Disposition: filename=key.bin');
- # now print the key
- echo $key;
- php?>
Advertisement
Add Comment
Please, Sign In to add comment