Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Nuke Treasury
Author Message
deathsdoor
New Member
New Member


Joined: Oct 09, 2006
Posts: 15

PostPosted: Sun Oct 08, 2006 10:11 pm Reply with quote

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.
 
View user's profile Send private message
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Mon Oct 09, 2006 6:54 pm Reply with quote

Theres a part of the paypal called ipn config, check it.
The results should show and error if one occurs.

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
deathsdoor
PostPosted: Mon Oct 09, 2006 9:42 pm Reply with quote

does not show any error? so why is it not working, or how can i fix this? thanks
 
deathsdoor
PostPosted: Mon Oct 09, 2006 11:00 pm Reply with quote

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
PostPosted: Mon Oct 09, 2006 11:10 pm Reply with quote

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
PostPosted: Tue Oct 10, 2006 4:09 pm Reply with quote

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
Worker


Joined: Aug 27, 2006
Posts: 172

PostPosted: Tue Oct 10, 2006 11:49 pm Reply with quote

Does anyone know how to use the module to make a refund?
 
View user's profile Send private message
deathsdoor
PostPosted: Tue Oct 10, 2006 11:54 pm Reply with quote

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
PostPosted: Wed Oct 11, 2006 10:08 am Reply with quote

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
PostPosted: Wed Oct 11, 2006 12:09 pm Reply with quote

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
PostPosted: Wed Oct 11, 2006 12:17 pm Reply with quote

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.
Only registered users can see links on this board! Get registered or login!

After that you need to setup the trasury config on NUKE
 
deathsdoor
PostPosted: Wed Oct 11, 2006 1:05 pm Reply with quote

ok thanks i'll do that right now. thanks for the quick reply
 
deathsdoor
PostPosted: Wed Oct 11, 2006 3:38 pm Reply with quote

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. Blonde Moment
 
shotokan
PostPosted: Thu Oct 12, 2006 8:01 am Reply with quote

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
PostPosted: Thu Oct 12, 2006 12:29 pm Reply with quote

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: Only registered users can see links on this board! Get registered or login! events


----------------------------------------------------------------
If you don't see any error messages, you should be good to go!
 
shotokan
PostPosted: Thu Oct 12, 2006 1:06 pm Reply with quote

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: Only registered users can see links on this board! Get registered or login! 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
PostPosted: Thu Oct 12, 2006 1:14 pm Reply with quote

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
PostPosted: Thu Oct 12, 2006 2:24 pm Reply with quote

What version of the donations MOD are you using?
 
deathsdoor
PostPosted: Thu Oct 12, 2006 10:15 pm Reply with quote

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
PostPosted: Fri Oct 13, 2006 9:30 am Reply with quote

OK you're using a different version of both softwares.
I use NukeTreasury 1,07 and PHP-Nuke but i don't think they are that different for this MOD.

You probably have a install.txt or readme.txt with the installation instructions for that treasury MOD right? Post it here so we can go step by step and get this figure out.

It seems you are hanging on the database part.
 
deathsdoor
PostPosted: Fri Oct 13, 2006 12:38 pm Reply with quote

I think your right.

As for " readme.txt with the installation instructions " i don't have any, all this was in the site ready for me to setup. i just had to go to the block and set it to active, and then start to set mail Addy and so on. no text hell file for me on my site, and i have looked around php sites, and still no luck, can not fined a help file for my donation block/ pay pal module. Sad
 
shotokan
PostPosted: Fri Oct 13, 2006 1:00 pm Reply with quote

OK. Don't need for panik. Look into your site folders a file with the extension .sql. If you find any let me know which ones you have. Don;t need to post them just let me know their names and where they are located.
 
deathsdoor
PostPosted: Fri Oct 13, 2006 11:52 pm Reply with quote

Ok now i'm starting to panic lol. been looking in all my folders in the cpanel, and can not find a sql. file. that said was one folder that said i could not access. its said locked only for admin host of site.

So what now?
 
shotokan
PostPosted: Sat Oct 14, 2006 1:17 pm Reply with quote

I don't think so. Ok the file might be a .TXT file too. So to a search into all you file to find anything that has something LIKE CREATE TABLE, INSERT, CREATE DB we need to find the scritp to create your DB.
 
deathsdoor
PostPosted: Sat Oct 14, 2006 1:57 pm Reply with quote

Ok i'll start looking whats your file name for yours, and in what folder, just incase mines in the same place?
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Nuke Treasury

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©