Jump to content

nightlife

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

nightlife's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I dont have any nuketreasury documentation.  I'm sure its s setting on my site has to be changed, or scriped edited to show the site what to look  for in paypal account, i have the code paypal gave me, would like some one how set up paypal and has it working right on there site to please help me thanks?
  2. I think i have the token, but do not know what to do with it, or in what part of the site to place it?
  3. does the code go on her or not? if not what part or file please? 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(); ?>[/code]
  4. What i mean by "they" is this! my pay pal account said to place the code into the site,it said this after clicking the two parts you told me. "Auto-Return turned on? It's under My Account > Preferences > Website Payment Preferences. You'll also want Payment Data Transfer turned on, and have a valid URL in the Return URL blank." then it asked for me to add the code to my site." but like i have already said i have no idea what part to add the code i'e string of numbers and letters?  does this make any sence to you? or am i mis understanding what i should be doing.  if i new what file this code should be placed onto and in what place to add the code i'm sure i could find it, please point me in the right direction thanks. "Auto-Return turned on? It's under My Account > Preferences > Website Payment Preferences. You'll also want Payment Data Transfer turned on, and have a valid URL in the Return URL blank." then it asked for me to add the code to my site.
  5. Sorry for bing a pain in the as* but i have no idea what part to add the code please could you say it in dummy turms, and step by step thanks.
  6. Ok i have gone to the higher account, and set what you told me, now its saying use the numbers in they gave to setup payments, its a long string on numbers and letters, what should i do with them and how? thanks
  7. Have just phoned pay pal, they said to get that kind of account we must have either a premier account, or a business account, so thanks for all your help. I'll sort that out now and hope it works.  ::)
  8. Ok just looked thanks for your screen shot, we do not have all listed like you? what account should we have to list the same as you? we dont have the web opptions. [IMG]http://img.photobucket.com/albums/v246/deathmad/ourpaypal.jpg[/img]
  9. ok can find my account, but not  Preferences > Website Payment Preferences?  still loking but having no luck.  :'(
  10. Are you saying the setting on pay pals end, have to be turned on, or on my site? sorry like i said not upto speed on php.
  11. Hi, please can anyone help, i have a new php site, and run a games server, we have just set up paypal on our site, and members have donated, the payment does come to our mail addy, and onto pay pal, but does not show on the site they made any payments, i am running this one Module's Name:NukeTreasury ,Module's Version: 1.0 please could you tell me what i might be doing wrong, and how to fix this, yes i am a noob at php, so please make this easy. thanks
  12. Please could you tell me how to config the Treasury in pay pal block, i have setup the account info, and paymants, and they show fine, but when i click on to donation block, it has no place to set times and ammonts the money should be payed by. it just says "Treasury Configuration" but can not click onto it or find any edit.  Thanks.
  13. Will the script work if placed on a php file? the one i have above?  and  how do i make that script play more than one song?
  14. [quote author=nightlife link=topic=105952.msg425355#msg425355 date=1157031729] So if i write a text file? with the tos for the site, what dir should it be placed into for it to link when they click join, and reach the tos page what they click to agree? [/quote] Thats why i'm asking about how to remake the tos... its not at the bottom of the page, its gone. how do i make a new tos, and pace it into the right dir for it to replace what was thier before. thanks
  15. That sound like a good idea, but how would i get the popup for the site and how would i add the music, and would pop up blocker stop this? if so maybe not what i'm after.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.