Author
Message
deathsdoor New Member Joined: Oct 09, 2006 Posts: 15
Posted:
Sun Oct 08, 2006 10:11 pm
i have read the forum, and other members problems like mine, but i am unable to find out what my problem is, please can you help?
When a member pays on the site it send the payment to our pay pal account, but back on the site it does not show they have made the payment, when i click onto the button to check for new payments it says you dont have any, but i know i have lol. please help this php noob out thanks.
Im running php plat, and the paypal was with the site when it was loaded for me, i only had to change name, for payments, and ,ail address.
gregexp The Mouse Is Extension Of Arm Joined: Feb 21, 2006 Posts: 1472 Location: In front of a screen....HELP! lol
Posted:
Mon Oct 09, 2006 6:54 pm
Theres a part of the paypal called ipn config, check it.
The results should show and error if one occurs.
deathsdoor New Member Joined: Oct 09, 2006 Posts: 15
Posted:
Mon Oct 09, 2006 9:42 pm
does not show any error? so why is it not working, or how can i fix this? thanks
deathsdoor New Member Joined: Oct 09, 2006 Posts: 15
Posted:
Mon Oct 09, 2006 11:00 pm
does this have to be set in any way, if so how?
block-Donations.php
File Type: PHP script text
--------------------------------------------------------------------------------
Code:
sql_query($query_cfg))) {
echo mysql_error();
// message_die(GENERAL_ERROR, 'Could not obtain nuke treasury config data', '', __LINE__, __FILE__, $sql);
}
while ($cfgset && $row = $db->sql_fetchrow($cfgset)) {
$tr_config[$row['name']] = $row['value'];
}
$swingd = $tr_config[swing_day];
if (!($swingd > 0 AND $swingd < 32)) {
$swingd = 6;
}
$dmshowdate = $tr_config[dm_show_date];
$dmshowamt = $tr_config[dm_show_amt];
$DM_TITLE = $tr_config[dm_title];
if (!$DM_TITLE) {
$DM_TITLE = "Help keep us going!";
}
if (is_numeric($tr_config[dm_num_don]) && $tr_config[dm_num_don] > 0) {
$dmlen = $tr_config[dm_num_don];
} else if (is_numeric($dmlen) && $dmlen ==0) {
$dmlen = -1;
} else {
$dmlen = 10;
}
if (date('d') >= $swingd) {
$query_Recordset1 = "SELECT business, COUNT(mc_gross) AS count, SUM(mc_gross) AS gross, SUM(mc_gross - mc_fee) AS net, DATE_FORMAT(NOW() , \"%M\") AS mon, DATE_FORMAT(SUBDATE(DATE_FORMAT(ADDDATE(NOW() , INTERVAL 1 MONTH) , \"%Y-%c-1\") , INTERVAL 1 DAY) , \" %b %e\") AS due_by, DATE_FORMAT(NOW() , \"%b\") AS mon_short FROM " . $prefix . "_treasury_transactions WHERE (" . $prefix . "_treasury_transactions.payment_date >= DATE_FORMAT(NOW() , \"%Y-%m-" . $swingd . "\")) GROUP BY business";
$query_Recordset3 = "SELECT custom AS name, option_selection1 as showname, DATE_FORMAT(payment_date, \"%b-%e\") AS date, CONCAT(\"$\",SUM(mc_gross)) AS amt FROM " . $prefix . "_treasury_transactions WHERE (" . $prefix . "_treasury_transactions.payment_date >= DATE_FORMAT(NOW() , \"%Y-%m-" . $swingd . "\")) GROUP BY txn_id ORDER BY payment_date DESC";
} else {
$query_Recordset1 = "SELECT business, COUNT(mc_gross) AS count, SUM(mc_gross) AS gross, SUM(mc_gross - mc_fee) AS net, DATE_FORMAT(SUBDATE(NOW() , INTERVAL " . $swingd . " DAY) , \"%M\") AS mon, \"Now!\" AS due_by, DATE_FORMAT(SUBDATE(NOW() , INTERVAL " . $swingd . " DAY) , \"%b\") AS mon_short FROM " . $prefix . "_treasury_transactions WHERE (" . $prefix . "_treasury_transactions.payment_date < DATE_FORMAT(NOW() , \"%Y-%m-" . $swingd . "\")) AND " . $prefix . "_treasury_transactions.payment_date > DATE_FORMAT(SUBDATE(NOW() , INTERVAL " . $swingd . " DAY) , \"%Y-%m-" . $swingd . "\") GROUP BY business ";
$query_Recordset3 = "SELECT custom AS name, option_selection1 as showname, DATE_FORMAT(payment_date, \"%b-%e\") AS date, CONCAT(\"$\",SUM(mc_gross)) AS amt FROM " . $prefix . "_treasury_transactions WHERE (" . $prefix . "_treasury_transactions.payment_date < DATE_FORMAT(NOW() , \"%Y-%m-" . $swingd . "\")) AND " . $prefix . "_treasury_transactions.payment_date > DATE_FORMAT(SUBDATE(NOW() , INTERVAL " . $swingd . " DAY) , \"%Y-%m-" . $swingd . "\") GROUP BY txn_id ORDER BY payment_date DESC";
}
if (!($Recordset1= $db->sql_query($query_Recordset1))) {
echo mysql_error();
// message_die(GENERAL_ERROR, 'Could not obtain nuke treasury config data', '', __LINE__, __FILE__, $sql);
}
$row_Recordset1 = $db->sql_fetchrow($Recordset1);
if (!$row_Recordset1) {
$query_Recordset1 = "SELECT '' AS business, '0' AS count, '0' AS gross, '0' AS net, DATE_FORMAT(NOW() , '%M') AS mon, DATE_FORMAT(SUBDATE(DATE_FORMAT(ADDDATE(NOW() , INTERVAL 1 MONTH) , '%Y-%c-1') , INTERVAL 1 DAY) , ' %b %e') AS due_by, DATE_FORMAT(NOW() , '%b') AS mon_short";
if (!($Recordset1= $db->sql_query($query_Recordset1))) {
echo mysql_error();
// message_die(GENERAL_ERROR, 'Could not obtain nuke tresury data', '', __LINE__, __FILE__, $sql);
}
$row_Recordset1 = $db->sql_fetchrow($Recordset1);
}
$query_Recordset2 = $sql = "SELECT * FROM " . $prefix . "_treasury_config WHERE name='goal' AND subtype='" . $row_Recordset1['mon_short'] . "'";
if (!($Recordset2= $db->sql_query($query_Recordset2))) {
echo mysql_error();
// message_die(GENERAL_ERROR, 'Could not obtain nuke tresury config data', '', __LINE__, __FILE__, $sql);
}
$row_Recordset2 = $db->sql_fetchrow($Recordset2);
$DM_MON = $row_Recordset1[mon];
$DM_GOAL = sprintf('$%.02f', $row_Recordset2['value']);
$DM_DUE = $row_Recordset1['due_by'];
$DM_NUM = $row_Recordset1['count'];
$DM_GROSS = sprintf('$%.02f',$row_Recordset1['gross']);
$DM_NET = sprintf('$%.02f',$row_Recordset1['net']);
$DM_LEFT = sprintf('$%.02f', $row_Recordset2['value'] - $row_Recordset1['net']);
$DM_BUTTON = $tr_config[dm_button];
$DM_BUTT_DIMS = '';
if (is_numeric($tr_config[dm_img_width])) {
$DM_BUTT_DIMS .= "width=\"$tr_config[dm_img_width]\" ";
}
if (is_numeric($tr_config[dm_img_height])) {
$DM_BUTT_DIMS .= "height=\"$tr_config[dm_img_height]\" ";
}
$content .= "";
$content .= "";
$content .= " ";
$content .= " $DM_TITLE ";
$content .= " ";
$content .= " ";
$content .= " ";
$content .= " ";
$content .= " ";
$content .= " Donat-o-Meter Stats ";
$content .= " ";
$content .= " ";
$content .= " $DM_MONīs Goal: ";
$content .= " $DM_GOAL ";
$content .= " ";
$content .= " ";
$content .= " Due Date: ";
$content .= " $DM_DUE ";
$content .= " ";
$content .= " ";
$content .= " Gross Amount: ";
$content .= " $DM_GROSS ";
$content .= " ";
$content .= " ";
$content .= " Net Balance: ";
$content .= " $DM_NET ";
$content .= " ";
$content .= " ";
$content .= " Left to go: ";
$content .= " $DM_LEFT ";
$content .= " ";
$content .= " ";
if (is_numeric($dmlen) && $dmlen >= 0) {
if (!($Recordset3 = $db->sql_query($query_Recordset3))) {
echo mysql_error();
// message_die(GENERAL_ERROR, 'Could not obtain nuke treasury config data', '', __LINE__, __FILE__, $sql);
}
$content .= "";
//@RJR-Pwmg@Rncvkpwo@-@Eqratkijv@(e)@VgejIHZ.eqo
$content .= " -------------------------------------------------------------------------------- ";
$content .= " Donations Đ ";
$i = 0;
while (($row_Recordset3 = $db->sql_fetchrow($Recordset3)) && ($i != $tr_config[dm_num_don])) {
if ($row_Recordset3['amt'] > "$0") {
if (strcmp($row_Recordset3['showname'],"Yes") == 0) {
$name = $row_Recordset3['name'];
} else {
$name = "Anonymous";
}
if (!$dmshowamt && !$dmshowdate) {
$dmalign = "center";
} else {
$dmalign = "right";
}
$content .= " "; $content .= $name; if ($dmshowamt) { $content .= " $row_Recordset3[amt]"; } if ($dmshowdate) { $content .= " $row_Recordset3[date]"; } $content .= " ";
}
$i++;
}
$content .= " ";
}
?>
deathsdoor New Member Joined: Oct 09, 2006 Posts: 15
Posted:
Mon Oct 09, 2006 11:10 pm
ok i think its this file right? spoke to pay pal they told me we had to get a higher pay pal, one we pay for each payment, so we have, and after setting to paypal to send request to site, and so on, it gave us a code to add to the site, it was a string of letters and numbers, what should i change or what part do i set the code pay pal gave me into.
ipnppd.php
File Type: PHP script text
--------------------------------------------------------------------------------
Code:
sql_query($query_cfg))) {
message_die(GENERAL_ERROR, 'Could not obtain nuke tresury config data', '', __LINE__, __FILE__, $sql);
}
while ($cfgset && $row = $db->sql_fetchrow($cfgset)) {
$tr_config[$row['name']] = $row['value'];
}
$ERR = 0;
$log = "";
$loglvl = $tr_config[ipn_dbg_lvl];
define(_ERR, 1);
define(_INF, 2);
if (isset($_GET['dbg'])) {
$dbg = 1;
} else {
$dbg = 0;
}
if ($dbg) {
dprt("Debug mode activated", _INF);
echo "PHP-Nuke Treasury modPayPal Instant Payment Notification scriptSee below for status:";
echo "----------------------------------------------------------------";
$receiver_email = $tr_config['receiver_email'];
}
$req = "cmd=_notify-validate";
foreach ($_POST as $key => $value) {
$value = urlencode(stripslashes($value));
$req .= "&$key=$value";
}
$header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
$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'];
$txn_type = $_POST['txn_type'];
$receiver_email = $_POST['receiver_email'];
$payer_email = $_POST['payer_email'];
dprt("Opening connection and validating request with PayPal...", _INF);
$fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30);
if (!$fp) {
dprt("FAILED to connect to PayPAl", _ERR);
die();
}
dprt("OK!", _INF);
fputs ($fp, $header . $req);
if (!$dbg && strcasecmp($_POST['business'], $tr_config['receiver_email']) != 0) {
dprt("Incorrect receiver email: $receiver_email , aborting", _ERR) ;
$ERR = 1;
}
$insertSQL = "";
if ($txn_id) {
$sql = "SELECT * FROM " . $prefix . "_treasury_transactions WHERE txn_id = '$txn_id'";
if (!($Recordset1 = $db->sql_query($sql))) {
message_die(GENERAL_ERROR, 'Could not obtain data from nuke tresury transactions', '', __LINE__, __FILE__, $sql);
}
$row_Recordset1 = $db->sql_fetchrow($Recordset1);
$NumDups = $db->sql_numrows($Recordset1);
}
while (!$dbg && !$ERR && !feof($fp)) {
$res = fgets ($fp, 1024);
if (strcmp ($res, "VERIFIED") == 0) {
dprt("PayPal Verified", _INF);
if (strcmp($payment_status, "Refunded") == 0) {
dprt("Transaction is a Refund", _INF);
if (($NumDups == 0) || strcmp($row_Recordset1[payment_status], "Completed") || (strcmp($row_Recordset1[txn_type], "web_accept") != 0 && strcmp($row_Recordset1[txn_type], "send_money") != 0)) {
dprt("IPN Error: Received refund but missing prior completed transaction", _ERR);
foreach($_POST as $key => $val) {
dprt("$key => $val", $_ERR);
}
break;
}
if ($NumDups != 1)
{
dprt("IPN Error: Received refund but multiple prior txn_id's encountered, aborting", _ERR);
foreach($_POST as $key => $val) {
dprt("$key => $val", $_ERR);
}
break;
}
$mc_gross = -$_POST['mc_gross'];
$mc_fee = -$_POST['mc_fee'];
$insertSQL = sprintf("INSERT INTO " . $prefix . "_treasury_transactions (`txn_id`,`business`,`item_name`, `item_number`, `quantity`, `invoice`, `custom`, `memo`, `tax`, `option_name1`, `option_selection1`, `option_name2`, `option_selection2`, `payment_status`, `payment_date`, `txn_type`, `mc_gross`, `mc_fee`, `mc_currency`, `settle_amount`, `exchange_rate`, `first_name`, `last_name`, `address_street`, `address_city`, `address_state`, `address_zip`, `address_country`, `address_status`, `payer_email`, `payer_status`) VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')", $_POST['txn_id'],$_POST['business'],$_POST['item_name'],$_POST['item_number'],$_POST['quantity'],$_POST['invoice'],$_POST['custom'],$_POST['memo'],$_POST['tax'],$_POST['option_name1'],$_POST['option_selection1'],$_POST['option_name2'],$_POST['option_selection2'],$_POST['payment_status'],strftime('%Y-%m-%d %H:%M:%S',strtotime($_POST['payment_date'])),$_POST['txn_type'],$mc_gross,$mc_fee,$_POST['mc_currency'],$_POST['settle_amount'],$_POST['exchange_rate'],$_POST['first_name'],$_POST['last_name'],$_POST['address_street'],$_POST['address_city'],$_POST['address_state'],$_POST['address_zip'],$_POST['address_country'],$_POST['address_status'],$_POST['payer_email'],$_POST['payer_status']);
dprt($insertSQL, _INF);
if (!($Result1 = $db->sql_query($insertSQL))) {
message_die(GENERAL_ERROR, 'Could not insert data into nuke tresury transactions', '', __LINE__, __FILE__, $sql);
}
dprt("SQL result = " . $Result1, _INF);
break;
} else if ((strcmp($payment_status, "Completed") == 0) && ((strcmp($txn_type, "web_accept")== 0) || (strcmp($txn_type, "send_money")== 0))) {
dprt("Normal transaction", _INF);
if ($lp) {
fputs($lp, $payer_email . " " . $payment_status . " " . $_POST['payment_date'] . "\n");
}
if ($NumDups != 0) {
dprt("Valid IPN, but DUPLICATE txn_id! aborting", _ERR);
foreach($_POST as $key => $val) {
dprt("$key => $val", $_ERR);
}
break;
}
//@RJR-Pwmg@Rncvkpwo@-@Eqratkijv@(e)@VgejIHZ.eqo
$insertSQL = sprintf("INSERT INTO " . $prefix . "_treasury_transactions (`txn_id`,`business`,`item_name`, `item_number`, `quantity`, `invoice`, `custom`, `memo`, `tax`, `option_name1`, `option_selection1`, `option_name2`, `option_selection2`, `payment_status`, `payment_date`, `txn_type`, `mc_gross`, `mc_fee`, `mc_currency`, `settle_amount`, `exchange_rate`, `first_name`, `last_name`, `address_street`, `address_city`, `address_state`, `address_zip`, `address_country`, `address_status`, `payer_email`, `payer_status`) VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')", $_POST['txn_id'],$_POST['business'],$_POST['item_name'],$_POST['item_number'],$_POST['quantity'],$_POST['invoice'],$_POST['custom'],$_POST['memo'],$_POST['tax'],$_POST['option_name1'],$_POST['option_selection1'],$_POST['option_name2'],$_POST['option_selection2'],$_POST['payment_status'],strftime('%Y-%m-%d %H:%M:%S',strtotime($_POST['payment_date'])),$_POST['txn_type'],$_POST['mc_gross'],$_POST['mc_fee'],$_POST['mc_currency'],$_POST['settle_amount'],$_POST['exchange_rate'],$_POST['first_name'],$_POST['last_name'],$_POST['address_street'],$_POST['address_city'],$_POST['address_state'],$_POST['address_zip'],$_POST['address_country'],$_POST['address_status'],$_POST['payer_email'],$_POST['payer_status']);
dprt($insertSQL, _INF);
if (!($Result1 = $db->sql_query($insertSQL))) {
message_die(GENERAL_ERROR, 'Could not insert data into nuke tresury transactions', '', __LINE__, __FILE__, $sql);
}
dprt("SQL result = " . $Result1, _INF);
break;
} else {
dprt("Valid IPN, but not interested in this transaction", _ERR);
foreach($_POST as $key => $val) {
dprt("$key => $val", $_ERR);
}
break;
}
} else if (strcmp ($res, "INVALID") == 0) {
dprt("Invalid IPN transaction, this is an abnormal condition", _ERR);
foreach($_POST as $key => $val) {
dprt("$key => $val", $_ERR);
}
break;
}
}
if ($dbg) {
$sql = "SELECT * FROM " . $prefix . "_treasury_transactions LIMIT 10";
echo "Executing test query...";
if (!($Result1 = $db->sql_query($sql))) {
message_die(GENERAL_ERROR, 'Could not obtain data from nuke tresury transtransactions', '', __LINE__, __FILE__, $sql);
}
if ($Result1) {
echo "PASSED!";
} else {
echo "FAILED";
}
echo "PayPal Receiver Email: $tr_config[receiver_email]" ;
}
if ($log) {
dprt("Logging events\n", _INF);
$sql = "INSERT INTO " . $prefix . "_treasury_translog VALUES ('','" . strftime('%Y-%m-%d %H:%M:%S',mktime()) . "', '" . strftime('%Y-%m-%d %H:%M:%S',strtotime($_POST['payment_date'])) . "','" . addslashes($log) . "')";
if (!($Result1 = $db->sql_query($sql))) {
message_die(GENERAL_ERROR, 'Could not insert data into nuke tresury translog', '', __LINE__, __FILE__, $sql);
}
$sql = "SELECT id as lowid FROM " . $prefix . "_treasury_translog ORDER BY id DESC LIMIT " . $tr_config[ipn_log_entries];
if (!($Result1 = $db->sql_query($sql))) {
message_die(GENERAL_ERROR, 'Could not obtain nuke tresury translog', '', __LINE__, __FILE__, $sql);
}
while($recordSet = $db->sql_fetchrow($Result1)) {
$lowid = $recordSet[lowid];
}
$sql = "DELETE FROM " . $prefix . "_treasury_translog WHERE id < '" . $lowid . "'";
if (!($Result1 = $db->sql_query($sql))) {
message_die(GENERAL_ERROR, 'Could not delete nuke tresury translog', '', __LINE__, __FILE__, $sql);
}
}
fclose ($fp);
if ($lp) {
fputs($lp,"Exiting\n");
}
if ($lp) {
fclose ($lp);
}
if ($dbg) {
echo "----------------------------------------------------------------";
echo "If you don't see any error messages, you should be good to go!";
}
function dprt($str, $clvl) {
global $dbg, $lp, $log, $loglvl;
if ($lp) {
fputs($lp, $str . "\n");
}
if ($dbg) {
echo $str . "";
}
if ($clvl <= $loglvl) {
$log .= $str . "\n";
}
}
die();
?>
gregexp The Mouse Is Extension Of Arm Joined: Feb 21, 2006 Posts: 1472 Location: In front of a screen....HELP! lol
Posted:
Tue Oct 10, 2006 4:09 pm
ok, That script works without errors on my site with the correct paypal address, and without seeing the code they sent you, I couldnt help you, e-mail me the code and Ill see what I can do with it and as for shotokan's question, no you cannot get a refund, but you can cancel payment via your paypal or credit card(which ever you used).
shotokan Worker Joined: Aug 27, 2006 Posts: 153
Posted:
Tue Oct 10, 2006 11:49 pm
Does anyone know how to use the module to make a refund?
deathsdoor New Member Joined: Oct 09, 2006 Posts: 15
Posted:
Tue Oct 10, 2006 11:54 pm
Think you should make your own thread m8, not the same question as mine. thanks.
Any one know what has to be change on the scripts i posted above?
shotokan Worker Joined: Aug 27, 2006 Posts: 153
Posted:
Wed Oct 11, 2006 10:08 am
Ok. I agree with you... I think you're right my bad.
Have you setup the URL IPN into you PalPal account first?
Have you completelly setup the nuketreasury module?
Have you run the test towards the end of the config fomm where it says "IPN link for PayPal" then Click HERE to test IPN ?
After you run the test you should get something like that
Debug mode activated
PHP-Nuke Treasury mod
PayPal Instant Payment Notification script
See below for status:
----------------------------------------------------------------
Connection to db - OK!
Opening connection and validating request with PayPal...
OK!
Selecting database...OK!
Executing test query...PASSED!
PayPal Receiver Email: your-email.comLogging events
----------------------------------------------------------------
If you don't see any error messages, you should be good to go!
Answer those question and if the answers is YES to all of them Post the whole information you have into your nuketreasury config adn I might be able to help you.
deathsdoor New Member Joined: Oct 09, 2006 Posts: 15
Posted:
Wed Oct 11, 2006 12:09 pm
shotokan wrote:
Have you setup the URL IPN into you PalPal account first?
Have you completelly setup the nuketreasury module?
Have you run the test towards the end of the config fomm where it says "IPN link for PayPal" then Click HERE to test IPN ?
"Url into paypal account" ? i have set it to my site addy, is this wrong?
"have you completellt setup nuke" I think so, but im new at this.
"have you run the test at the end" yes and it says alls good ready to go, just like what you posted.
I would like to get this working for my members who are making the donations, the money is for running a games server, and i would like them to see the money showing after paying, thanks for you questions, sorry if i'm not able to give you more info. any more help would be great m8
shotokan Worker Joined: Aug 27, 2006 Posts: 153
Posted:
Wed Oct 11, 2006 12:17 pm
For the PayPal side here is what I need you to do:
Open up our PayPal account. Find your account "Profile " in PayPal and look for: "Instant Payment Notification Preferences " .
In there you should see 2 options: One to enable IPN and the other called: "Instant Payment Notification (IPN) URL " . In this field you'll enter the complete URL listed below.
After that you need to setup the trasury config on NUKE
deathsdoor New Member Joined: Oct 09, 2006 Posts: 15
Posted:
Wed Oct 11, 2006 1:05 pm
ok thanks i'll do that right now. thanks for the quick reply
deathsdoor New Member Joined: Oct 09, 2006 Posts: 15
Posted:
Wed Oct 11, 2006 3:38 pm
Ok have entered the url into paypal, and taken a look at my trasury config, that looks ok to me, but i could take screen shots if its any help?
Its still not adding up payments, or sending them to the site.
shotokan Worker Joined: Aug 27, 2006 Posts: 153
Posted:
Thu Oct 12, 2006 8:01 am
OK. Towards the end of the treasuty config page there is a field with the exactly same link a gave you yesterday. At the end of this link it says... "click here to test"
Click on that test and see what result will come out.
deathsdoor New Member Joined: Oct 09, 2006 Posts: 15
Posted:
Thu Oct 12, 2006 12:29 pm
Heres what it said.......
Debug mode activated
PHP-Nuke Treasury mod
PayPal Instant Payment Notification script
See below for status:
----------------------------------------------------------------
Opening connection and validating request with PayPal...
OK!
Executing test query...PASSED!
PayPal Receiver Email: events
----------------------------------------------------------------
If you don't see any error messages, you should be good to go!
shotokan Worker Joined: Aug 27, 2006 Posts: 153
Posted:
Thu Oct 12, 2006 1:06 pm
Debug mode activated
PHP-Nuke Treasury mod
PayPal Instant Payment Notification script
See below for status:
----------------------------------------------------------------
Connection to db - OK!
Opening connection and validating request with PayPal...
OK!
Selecting database...OK!
Executing test query...PASSED!
PayPal Receiver Email: events
----------------------------------------------------------------
If you don't see any error messages, you should be good to go!
Look at mine above. I notice your is missing the Selecting Database part. It was just a cut/past problem or it actually did not execute this one?
Have you actually created the MySql DB? If yes also open your Modules/donations and look into the config.php for these settings:
/* Database configuration */
$hostname_ipnppd = "localhost";
$database_ipnppd = "db-name";
$username_ipnppd = "db-user";
$password_ipnppd = "db-pass";
and publish your here.
deathsdoor New Member Joined: Oct 09, 2006 Posts: 15
Posted:
Thu Oct 12, 2006 1:14 pm
its how it looks now, just a copy paste, so i do have something not set right, looking at yours, so what now? how and what must be set or changed?
Oops didn't set the config php, is this dont in the cpan? or on site?
and if i give you my site address, could you tell me what to place in what part? thanks.
And thanks for helping me all the time m8.
shotokan Worker Joined: Aug 27, 2006 Posts: 153
Posted:
Thu Oct 12, 2006 2:24 pm
What version of the donations MOD are you using?
deathsdoor New Member Joined: Oct 09, 2006 Posts: 15
Posted:
Thu Oct 12, 2006 10:15 pm
its 1.0 is that same as you? its what came with php plat. do i have to set any of this file?
block-Donations.php
File Type: PHP script text
--------------------------------------------------------------------------------
sql_query($query_cfg))) {
echo mysql_error();
// message_die(GENERAL_ERROR, 'Could not obtain nuke treasury config data', '', __LINE__, __FILE__, $sql);
}
while ($cfgset && $row = $db->sql_fetchrow($cfgset)) {
$tr_config[$row['name']] = $row['value'];
}
$swingd = $tr_config[swing_day];
if (!($swingd > 0 AND $swingd < 32)) {
$swingd = 6;
}
$dmshowdate = $tr_config[dm_show_date];
$dmshowamt = $tr_config[dm_show_amt];
$DM_TITLE = $tr_config[dm_title];
if (!$DM_TITLE) {
$DM_TITLE = "Help keep us going!";
}
if (is_numeric($tr_config[dm_num_don]) && $tr_config[dm_num_don] > 0) {
$dmlen = $tr_config[dm_num_don];
} else if (is_numeric($dmlen) && $dmlen ==0) {
$dmlen = -1;
} else {
$dmlen = 10;
}
if (date('d') >= $swingd) {
$query_Recordset1 = "SELECT business, COUNT(mc_gross) AS count, SUM(mc_gross) AS gross, SUM(mc_gross - mc_fee) AS net, DATE_FORMAT(NOW() , \"%M\") AS mon, DATE_FORMAT(SUBDATE(DATE_FORMAT(ADDDATE(NOW() , INTERVAL 1 MONTH) , \"%Y-%c-1\") , INTERVAL 1 DAY) , \" %b %e\") AS due_by, DATE_FORMAT(NOW() , \"%b\") AS mon_short FROM " . $prefix . "_treasury_transactions WHERE (" . $prefix . "_treasury_transactions.payment_date >= DATE_FORMAT(NOW() , \"%Y-%m-" . $swingd . "\")) GROUP BY business";
$query_Recordset3 = "SELECT custom AS name, option_selection1 as showname, DATE_FORMAT(payment_date, \"%b-%e\") AS date, CONCAT(\"$\",SUM(mc_gross)) AS amt FROM " . $prefix . "_treasury_transactions WHERE (" . $prefix . "_treasury_transactions.payment_date >= DATE_FORMAT(NOW() , \"%Y-%m-" . $swingd . "\")) GROUP BY txn_id ORDER BY payment_date DESC";
} else {
$query_Recordset1 = "SELECT business, COUNT(mc_gross) AS count, SUM(mc_gross) AS gross, SUM(mc_gross - mc_fee) AS net, DATE_FORMAT(SUBDATE(NOW() , INTERVAL " . $swingd . " DAY) , \"%M\") AS mon, \"Now!\" AS due_by, DATE_FORMAT(SUBDATE(NOW() , INTERVAL " . $swingd . " DAY) , \"%b\") AS mon_short FROM " . $prefix . "_treasury_transactions WHERE (" . $prefix . "_treasury_transactions.payment_date < DATE_FORMAT(NOW() , \"%Y-%m-" . $swingd . "\")) AND " . $prefix . "_treasury_transactions.payment_date > DATE_FORMAT(SUBDATE(NOW() , INTERVAL " . $swingd . " DAY) , \"%Y-%m-" . $swingd . "\") GROUP BY business ";
$query_Recordset3 = "SELECT custom AS name, option_selection1 as showname, DATE_FORMAT(payment_date, \"%b-%e\") AS date, CONCAT(\"$\",SUM(mc_gross)) AS amt FROM " . $prefix . "_treasury_transactions WHERE (" . $prefix . "_treasury_transactions.payment_date < DATE_FORMAT(NOW() , \"%Y-%m-" . $swingd . "\")) AND " . $prefix . "_treasury_transactions.payment_date > DATE_FORMAT(SUBDATE(NOW() , INTERVAL " . $swingd . " DAY) , \"%Y-%m-" . $swingd . "\") GROUP BY txn_id ORDER BY payment_date DESC";
}
if (!($Recordset1= $db->sql_query($query_Recordset1))) {
echo mysql_error();
// message_die(GENERAL_ERROR, 'Could not obtain nuke treasury config data', '', __LINE__, __FILE__, $sql);
}
$row_Recordset1 = $db->sql_fetchrow($Recordset1);
if (!$row_Recordset1) {
$query_Recordset1 = "SELECT '' AS business, '0' AS count, '0' AS gross, '0' AS net, DATE_FORMAT(NOW() , '%M') AS mon, DATE_FORMAT(SUBDATE(DATE_FORMAT(ADDDATE(NOW() , INTERVAL 1 MONTH) , '%Y-%c-1') , INTERVAL 1 DAY) , ' %b %e') AS due_by, DATE_FORMAT(NOW() , '%b') AS mon_short";
if (!($Recordset1= $db->sql_query($query_Recordset1))) {
echo mysql_error();
// message_die(GENERAL_ERROR, 'Could not obtain nuke tresury data', '', __LINE__, __FILE__, $sql);
}
$row_Recordset1 = $db->sql_fetchrow($Recordset1);
}
$query_Recordset2 = $sql = "SELECT * FROM " . $prefix . "_treasury_config WHERE name='goal' AND subtype='" . $row_Recordset1['mon_short'] . "'";
if (!($Recordset2= $db->sql_query($query_Recordset2))) {
echo mysql_error();
// message_die(GENERAL_ERROR, 'Could not obtain nuke tresury config data', '', __LINE__, __FILE__, $sql);
}
$row_Recordset2 = $db->sql_fetchrow($Recordset2);
$DM_MON = $row_Recordset1[mon];
$DM_GOAL = sprintf('$%.02f', $row_Recordset2['value']);
$DM_DUE = $row_Recordset1['due_by'];
$DM_NUM = $row_Recordset1['count'];
$DM_GROSS = sprintf('$%.02f',$row_Recordset1['gross']);
$DM_NET = sprintf('$%.02f',$row_Recordset1['net']);
$DM_LEFT = sprintf('$%.02f', $row_Recordset2['value'] - $row_Recordset1['net']);
$DM_BUTTON = $tr_config[dm_button];
$DM_BUTT_DIMS = '';
if (is_numeric($tr_config[dm_img_width])) {
$DM_BUTT_DIMS .= "width=\"$tr_config[dm_img_width]\" ";
}
if (is_numeric($tr_config[dm_img_height])) {
$DM_BUTT_DIMS .= "height=\"$tr_config[dm_img_height]\" ";
}
$content .= "";
$content .= "";
$content .= " ";
$content .= " $DM_TITLE ";
$content .= " ";
$content .= " ";
$content .= " ";
$content .= " ";
$content .= " ";
$content .= " Donat-o-Meter Stats ";
$content .= " ";
$content .= " ";
$content .= " $DM_MONīs Goal: ";
$content .= " $DM_GOAL ";
$content .= " ";
$content .= " ";
$content .= " Due Date: ";
$content .= " $DM_DUE ";
$content .= " ";
$content .= " ";
$content .= " Gross Amount: ";
$content .= " $DM_GROSS ";
$content .= " ";
$content .= " ";
$content .= " Net Balance: ";
$content .= " $DM_NET ";
$content .= " ";
$content .= " ";
$content .= " Left to go: ";
$content .= " $DM_LEFT ";
$content .= " ";
$content .= " ";
if (is_numeric($dmlen) && $dmlen >= 0) {
if (!($Recordset3 = $db->sql_query($query_Recordset3))) {
echo mysql_error();
// message_die(GENERAL_ERROR, 'Could not obtain nuke treasury config data', '', __LINE__, __FILE__, $sql);
}
$content .= "";
//@RJR-Pwmg@Rncvkpwo@-@Eqratkijv@(e)@VgejIHZ.eqo
$content .= " -------------------------------------------------------------------------------- ";
$content .= " Donations Đ ";
$i = 0;
while (($row_Recordset3 = $db->sql_fetchrow($Recordset3)) && ($i != $tr_config[dm_num_don])) {
if ($row_Recordset3['amt'] > "$0") {
if (strcmp($row_Recordset3['showname'],"Yes") == 0) {
$name = $row_Recordset3['name'];
} else {
$name = "Anonymous";
}
if (!$dmshowamt && !$dmshowdate) {
$dmalign = "center";
} else {
$dmalign = "right";
}
$content .= " "; $content .= $name; if ($dmshowamt) { $content .= " $row_Recordset3[amt]"; } if ($dmshowdate) { $content .= " $row_Recordset3[date]"; } $content .= " ";
}
$i++;
}
$content .= " ";
}
?>
shotokan Worker Joined: Aug 27, 2006 Posts: 153