[guadec-web] Switch to the real account
- From: Pascal Terjan <pterjan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [guadec-web] Switch to the real account
- Date: Thu, 17 Jul 2014 08:48:42 +0000 (UTC)
commit b92d654071e37ed6970d2edb9dba90b08173bea8
Author: Pascal Terjan <pterjan gmail com>
Date: Wed Jul 16 14:37:53 2014 +0000
Switch to the real account
guadec/confirm-payment.php | 8 ++++----
guadec/ipn.php | 23 ++++++++++++-----------
2 files changed, 16 insertions(+), 15 deletions(-)
---
diff --git a/guadec/confirm-payment.php b/guadec/confirm-payment.php
index 4e293fc..6bee97a 100644
--- a/guadec/confirm-payment.php
+++ b/guadec/confirm-payment.php
@@ -107,7 +107,7 @@ if (!empty($_POST)) {
$sponsor_check = ($_POST['sponsored'] == true)?"YES":"NO";
$payment = ($tamount > 0)?"Pending":"NoPayment";
$accom = ($_POST['accommodation'] == true)?"YES":"NO";
- $headers = "From: GUADEC 2014 Registration Script <membership-committee gnome org>\n";
+ $headers = "From: GUADEC 2014 Registration Script <contact guadec org>\n";
if ($errors == false) {
/* This variable not be changed: goes to a restricted field to Paypal API */
@@ -123,7 +123,7 @@ if (!empty($_POST)) {
"totalfee=".$tamount
;
$mailContent .= $registerInfo;
- $subject = "From GUADEC 2014 Registration";
+ $subject = "GUADEC 2014 Registration";
$wpdb->insert($table_name, array('timeofregistration' => date("Y-m-d H:i:s"),
'name' => $name,
'email' => $email,
@@ -219,9 +219,9 @@ if (!empty($_POST)) {
<?php if ($tamount > 0): ?>
<div>Your details have been stored. Proceed to pay €<?php echo $tamount;?>.</div>
- <form name="_xclick" action="https://www.sandbox.paypal.com/cgi-bin/webscr"
method="post">
+ <form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
- <input type="hidden" name="business" value="saumya zero-facilitator gmail com">
+ <input type="hidden" name="business" value="guadec gnome org">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="item_name" value="GUADEC 2014">
<input type="hidden" name="amount" value="<?php echo $tamount; ?>">
diff --git a/guadec/ipn.php b/guadec/ipn.php
index 7ec0efb..3e0be83 100755
--- a/guadec/ipn.php
+++ b/guadec/ipn.php
@@ -15,8 +15,8 @@ ini_set('error_log', 'ipn_errors.log');
include('ipnlistener.php');
$listener = new IpnListener();
-// tell the IPN listener to use the PayPal test sandbox
-$listener->use_sandbox = true;
+// tell the IPN listener to not the PayPal test sandbox
+$listener->use_sandbox = false;
// try to process the IPN POST
try {
@@ -57,7 +57,7 @@ if ($verified) {
}
// 2. Make sure seller email matches your primary account email.
- if ($_POST['receiver_email'] !='saumya zero-facilitator gmail com') {
+ if ($_POST['receiver_email'] !='guadec gnome org') {
$errmsg .= "'receiver_email' does not match: ";
$errmsg .= $_POST['receiver_email']."\n";
}
@@ -65,7 +65,7 @@ if ($verified) {
// 3. Make sure the amount(s) paid match
$total_fee = floatval($cvar['totalfee']);
if ($_POST['mc_gross'] != $total_fee) {
- $errmsg .= "'mc_gross' does not match: ";
+ $errmsg .= "Total fee does not match (expected $total_fee): ";
$errmsg .= $_POST['mc_gross']."\n";
}
@@ -84,9 +84,13 @@ if ($verified) {
$status = "FraudCheck";
$upipn = $listener->updateCompleted($reg_email,$status);
error_log($upipn);
+
+ $body = "Your payment was accepted but was not as expected and your registration will need manual
validation.";
+ mail($_POST['payer_email'], 'GUADEC-2014 Registration Payment: Waiting for Confirmation', $body,
$headers);
+
// manually investigate errors from the fraud checking
- $body .= "Registration Payment Successful-with fraud warning ";
- $body .= "IPN failed fraud checks: \n$errmsg\n\n";
+ $body = "Registration Payment Successful-with fraud warning: \n";
+ $body .= "$errmsg\n\n";
//append with the real payment details
$body .= $cvar['name'];
@@ -94,16 +98,14 @@ if ($verified) {
$body .= $cvar['email'];
$body .= $listener->getTextReport();
error_log($body); // Transcript copy in the error log
- mail($_POST['receiver_email'], 'IPN Fraud Warning', $body, $headers);
- mail($_POST['payer_email'], 'GUADEC-2014 Registration Payment:Waiting for Confirmation', $body,
$headers);
-
+ mail('zana gnome org, pterjan gmail com', 'Guadec Payment Fraud Warning (validation needed)', $body,
$headers);
} else {
$body = $listener->updateCompleted($reg_email, 'Completed');
$body .= "Registration Payment Successful for ";
$body .= $cvar['name'];
$body .= " with email ";
$body .= $cvar['email'];
- mail($_POST['payer_email'], 'GUADEC-2014 Registration Successful', $body, $headers);
+ mail($_POST['payer_email'], 'GUADEC-2014 Registration Payment Successful', $body, $headers);
$body .= "Complete List of items that you have paid for\n";
$email_content =
"Name: " . $cvar['name'] . "\r\n".
@@ -120,7 +122,6 @@ if ($verified) {
mail($cvar['email'], 'GUADEC-2014 Registration Successful', $body, $headers);
$body .= $listener->getTextReport();
error_log($body);
- mail($_POST['receiver_email'], 'GUADEC-2014 Registration Payment Successful', $body, $headers);
}
}
else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]