11.02
php
the_undefined
Note
the_undefined did not leave a note
the_undefined did not leave a note
- <?php
- require_once('S3.php');
- 'from' => 'billing@debuggable.com'
- );
- $req = 'cmd=_notify-validate';
- $req = $req.'&'.http_build_query($_POST);
- // post back to PayPal system to validate
- $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";
- $header .= "Host: www.paypal.com:443\r\n";
- $header .= "Content-Type: application/x-www-form-urlencoded\r\n";
- // assign posted variables to local variables
- $item_name = $_POST['item_name'];
- $item_number = $_POST['item_number'];
- $payment_status = $_POST['payment_status'];
- $payment_amount = $_POST['mc_gross'];
- $payment_currency = $_POST['mc_currency'];
- $txn_id = $_POST['txn_id'];
- $receiver_email = $_POST['receiver_email'];
- $payer_email = $_POST['payer_email'];
- $payment_date = $_POST['payment_date'];
- //set email variables
- $From_email = "From: billing@debuggable.com";
- $Subject_line = "Payment Receipt";
- $s3 = new S3('secret', 'secret');
- $email_msg = sprintf("Thanks for purchasing the item \"%s\" for %s %s. I hope you will like it.", $item_name, $payment_amount, $payment_currency);
- $email_msg .= "\n\nIn order to download the screencast, please visit:";
- $email_msg .= "\n\n".$url;
- $email_msg .= "\n\nPurchase Information:";
- $email_msg .= "\n\n" . "Transaction ID: " . $txn_id ;
- $email_msg .= "\n" . "Payment Date: " . $payment_date;
- $email_msg .= "\n\nThe download link will expire in 48 hours. If you lost your copy of a screencast, please visit git.debuggable.com for instructions.";
- $email_msg .= "\n\nDebuggable Limited";
- $email_msg .= "\nHibiskusweg 26c";
- $email_msg .= "\n13089 Berlin";
- $email_msg .= "\n\nVAT ID: 1129/266/00830";
- $email_msg .= "\nEntry in the commercial register: HRB 112594 B (at the local court of Charlottenburg Berlin)";
- if (!$fp) {
- exit;
- }
- $res = null;
- }
- mail('felix@debuggable.com', 'Unverified Transaction (PayPal IPN)', "Response: ".$res."\n\n"."Request:".$req."\n\n".$dump, $mail_From);
- exit;
- }
- if (!$purchases) {
- $purchases = null;
- }
- $purchases = $purchases.$payment_date."\t".$payer_email."\t".$payment_amount." ".$payment_currency."\n";
- file_put_contents('purchases.txt', $purchases);
- ?>
Parsed in 0.218 seconds, using GeSHi 1.0.7.14