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
shotokan
Worker
Worker



Joined: Aug 27, 2006
Posts: 172

PostPosted: Sat Oct 14, 2006 4:24 pm Reply with quote

I will have to check o monday because i don;t have the access from here.

_________________
Shotokan 
View user's profile Send private message
deathsdoor
New Member
New Member



Joined: Oct 09, 2006
Posts: 15

PostPosted: Mon Oct 16, 2006 12:09 am Reply with quote

I have a php file that could be the one to change, but not really sure, i can send a copy to your mail address, if you would like a look, i did try to post it he, but because its a php script, the forum banned me, and i had to send a mail to admin of site. so pm your mail addy and i'll send it to you if you like?
 
View user's profile Send private message
lilc420
New Member
New Member



Joined: Feb 02, 2007
Posts: 24

PostPosted: Sat Feb 03, 2007 6:31 pm Reply with quote

This is lengthy but may help you a little. Some steps will be skipped due to it having been pre-installed. This comes in the downloaded version 1.1.

Quote:
======
Setup Instructions
======
Unpack all the file unders "html" into your Nuke root

Extract the sql/Treasury.sql and drop it into mysql.
Note: the database for this mod was intended to reside outside of your Nuke
database in a separate database. The thought here is that the
financial records would require special attention in regards to
backups. A separate db just makes those backups easier. You can
put the table inside whatever database you'd like(including Nuke),
however there's no support for a table prefix at this time.

Edit the modules/Donations/config.php and enter the approporiate
sql credentials.

Go to the Nuke Admin panel and enable the "Donat_o_Meter" block
and the "Donations" module. Make sure the Donatometer displays
correctly and check the link to the Donations module on the
"Make a Donation" button.

======
PayPal
======
In the admin panel, click the Treasury icon and then click on the
"Config" button. Scroll down towards the bottom in the PayPal
Configuration box and find and find the option "PayPal Receiver Email".
Enter the email address registered in your PayPal account that you
would like to receive donation on. I highly recommend you have a special
email address for this. This mod will show all payments made to this
address, whether they came from this mod, or not. Click on a Submit
button once you have entered the email address.
This should take you back to the Treasury panel, click onthe config
button again scroll down to the bottom and find the box labeled
"IPN link for PayPal". The URL to the right should be the complete URL
that points to the IPN file PayPal needs. Click on the link provided
to test the IPN file. Keep this window open during the next step as we
will need to copy out the IPN URL.
Assuming the files tests ok, we now want to 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 in the previous window on the Treasury config
page. it should be something like this:
[ Only registered users can see links on this board! Get registered or login! ]

If your Nuke site is not in the root, then:
[ Only registered users can see links on this board! Get registered or login! ]

"nukename" is, of course, whatever folder you have under your site root.

Your IPN is enabled!

==================
Nuke Configuration
==================
The NukeTreasury includes a plethora of configurable options.
To get started all you need to configure is the "PayPal Receiver Email"
which we did above. All the other options are gravy. Each option
has a tool tip that describes it's use. Practically every option
involved in this mod is configurable. It was designed so that no
file editing was required. The Donatometer block and Donations module
are pulled from template files located in modules/Donations. If you
like you can edit these html templates to further customize this mod.
I tried to lay out the tags as clearly as I could to ease customization.
The text listed in the Donations module is actually stored in the
database and you can customize it on the Treasury Config page. This
text block can contain any HTML markup you like and remember it's HTML
(so you need <br>'s for line breaks, for example)


==============
NOTES on usage
==============
-The PayPal IPN is a live transaction and can only occur when the
payment is actually made. There is no way to receive IPN's for past
transactions. This is inherent in the PayPal IPN design.
-Refunds are properly handled. If you have logging enabled, and you
refund a payment you will see a log entry:
"Valid IPN, but not interested in this transaction"
This a normal log entry for a refund. The PayPal actually sends 2
IPN's that relate to a single refund. This mod only needs one of the 2.
The log entry is for the second, un-needed IPN.



============
Known Issues
============
-The Treasury admin panel can only be accessed with "Super User" privs.
This is primarily because Nuke is not easily adapted to allow customized
admin panel priviledges. This would require a php code change when
no php code changes are required at all for this mod.
-The IPN transactions and log is only viewable directly from the database,
and through tools such as phpmyadmin.


=======
Testing
=======
-Once you have this mod fully configured you should make a test
donation. You can do this by making a normal donation that you can
later refund in full. In PayPal, looking at the details of the
transaction for the donation you just made, you should see a link
where you can refund the payment. You can make and refund as many
payments as you like without any cash penalty.



Have fun!
 
View user's profile Send private message
kypdr
New Member
New Member



Joined: Feb 22, 2007
Posts: 17

PostPosted: Fri Feb 23, 2007 11:36 am Reply with quote

shotokan wrote:

/* Database configuration */
$hostname_ipnppd = "localhost";
$database_ipnppd = "db-name";
$username_ipnppd = "db-user";
$password_ipnppd = "db-pass";

and publish your here.


Is this config exactly what I should see or do i substitute appropriate items into quotes?
 
View user's profile Send private message
kypdr







PostPosted: Fri Feb 23, 2007 8:20 pm Reply with quote

When I do an IPN test I get this error.

Quote:

Warning: main(../config.php ) [function.main]: failed to open stream: No such file or directory in /home/wa5pshiv/public_html/nuke/modules/Donations/ipn/ipnppd.php on line 9

Warning: main(../config.php ) [function.main]: failed to open stream: No such file or directory in /home/wa5pshiv/public_html/nuke/modules/Donations/ipn/ipnppd.php on line 9

Warning: main(../config.php ) [function.main]: failed to open stream: No such file or directory in /home/wa5pshiv/public_html/nuke/modules/Donations/ipn/ipnppd.php on line 9

Warning: main() [function.include]: Failed opening '../config.php ' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/wa5pshiv/public_html/nuke/modules/Donations/ipn/ipnppd.php on line 9
Debug mode activated

PHP-Nuke Treasury mod

PayPal Instant Payment Notification script

See below for status:
----------------------------------------------------------------

Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'wa5pshiv'@'localhost' (using password: NO) in /home/wa5pshiv/public_html/nuke/modules/Donations/ipn/ipnppd.php on line 29
Access denied for user 'wa5pshiv'@'localhost' (using password: NO)
 
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Fri Feb 23, 2007 9:50 pm Reply with quote

Looks like it wants the file config.php in
modules/Donations/config.php
Do you have that file?

_________________
- Star Wars Rebellion Network -

Need help? Nuke Patched Core, Coding Services, Webmaster Services 
View user's profile Send private message Visit poster's website
kypdr







PostPosted: Fri Feb 23, 2007 10:18 pm Reply with quote

Yes, here is the top of the ipnppd.php file
Quote:
<?php
/************************************************************************/
/* NukeTreasury - Financial management for PHP-Nuke */
/************************************************************************/

/* NOTE: This file is accessed by PayPal directly, and not through PHP-Nuke */

include("../config.php
");
$ERR = 0;
$log = "";
$loglvl = $tr_config[ipn_dbg_lvl];
define(_ERR, 1);
define(_INF, 2);


Here is my config.php file. I think my problem is with what I highlighted red. But I don't know enough to fix it.

Quote:
<?php
/************************************************************************/
/* NukeTreasury - Financial management for PHP-Nuke */
/************************************************************************/

/* Database configuration */
/* Database configuration */

$hostname_ipnppd = "localhost";
$database_ipnppd = "wa5pshiv_wa5psdonator";
$username_ipnppd = "wa5pshiv@localhost";
$password_ipnppd = "no";


$board_config = array();
global $ipnppd;

$ipnppd = mysql_pconnect($hostname_ipnppd, $username_ipnppd, $password_ipnppd);
if( $ipnppd )
{
mysql_select_db($database_ipnppd, $ipnppd);
$query_cfg = "SELECT * FROM config WHERE subtype = ''";
$cfgset = mysql_query($query_cfg, $ipnppd);

while ( $cfgset && $row = mysql_fetch_assoc($cfgset))
{
$tr_config[$row['name']] = $row['value'];
}
} else
{
echo "<br><br>NukeTreasury FATAL ERROR: Unable to connect to SQL database. Please check your settings in modules/Donations/config.php<br><br>";
}

?>
 
evaders99







PostPosted: Sat Feb 24, 2007 12:15 am Reply with quote

Are you sure the username is correct? It isn't an email address, it probably doesn't need the @localhost
 
kypdr







PostPosted: Sat Feb 24, 2007 2:06 am Reply with quote

where would I verify I have the right name??
 
lilc420







PostPosted: Sat Feb 24, 2007 1:50 pm Reply with quote

kypdr wrote:
where would I verify I have the right name??
All this info is provided by your wesite host. The database name and password you created when you set up your site.

Should be similar to this.

$hostname_ipnppd = "'mysql1234.secureserver.net'";
$database_ipnppd = "DatabaseName";
$username_ipnppd = "YourUserName";
$password_ipnppd = "YourPassword";

These are NOT your website login names, UNLESS you used the same info for your database as you do to login.
 
kypdr







PostPosted: Sat Feb 24, 2007 3:34 pm Reply with quote

Quote:
wa5pshiv_waspsdonator

Users in waspsdonator
wa5pshiv_admin (Privileges: ALL PRIVILEGES)

Connection Strings
Perl $dbh = DBI->connect("DBI:mysql:*****_*******:localhost","wa5pshiv_*****","<PASSWORD HERE>");
PHP $dbh=mysql_connect ("localhost", "wa5pshiv_*****", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("*****_*******");


does this make sense looking at the above?

Quote:
$hostname_ipnppd = "mysql:*****_*******";
$database_ipnppd = "******";
$username_ipnppd = "*****";
$password_ipnppd = "******";


Last edited by kypdr on Mon Feb 26, 2007 9:41 am; edited 1 time in total 
lilc420







PostPosted: Sat Feb 24, 2007 6:14 pm Reply with quote

it looks right.. as long as you got all the info from your host.
 
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Sat Feb 24, 2007 6:55 pm Reply with quote

Please edit your posts to remove sensetive information - unless of course you really want hackers to use that information.
 
View user's profile Send private message Send e-mail
kypdr







PostPosted: Mon Feb 26, 2007 3:57 pm Reply with quote

lilc420 wrote:
it looks right.. as long as you got all the info from your host.


But I'm still getting the error.


BTW; Guardian2003 TY for the slap in the face about my post. Wasn't thinking when I did that.
 
lilc420







PostPosted: Mon Feb 26, 2007 4:28 pm Reply with quote

Who hosts your website?
 
kypdr







PostPosted: Mon Feb 26, 2007 7:36 pm Reply with quote

Branzone.com it uses cpanel.
 
lilc420







PostPosted: Mon Feb 26, 2007 8:26 pm Reply with quote

I am not familiar with them. You may need to contact them and ask them for the correct info. or how to find it. I think something is still not correct... or your host is blocking a port or something.

Also, did you make all your changes on the PayPal website?
 
kypdr







PostPosted: Mon Feb 26, 2007 10:31 pm Reply with quote

I just had to activate the IPN and put in the correct URL at Paypal, correct?
 
lilc420







PostPosted: Mon Feb 26, 2007 10:36 pm Reply with quote

Not sure.. it should have instructions in the readme. I think maybe your LocalHost is still wrong.. should be something like Mysql##.something.net

Look in your myphpadmin for a connection string.. or maybe in your Cpanel under database. You connection string will have all info you need in it.
 
kypdr







PostPosted: Mon Feb 26, 2007 11:06 pm Reply with quote

In MySQL account maintainance

Connection Strings

Quote:
PERL DBI->connect("DBI:mysql:*****_*****:localhost"



Quote:
PHP $dbh=mysql_connect ("localhost", "*****_****", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("******_*********");



This is under myphpadmin at top.

Quote:
Server: localhost Database: *******_********
 
chizo
New Member
New Member



Joined: Jul 08, 2007
Posts: 9

PostPosted: Wed Jul 11, 2007 10:41 am Reply with quote

Hey ppl,

Don't know if anyone still cares about this posting or not, but I've worked for days on this, and finally got it to work correctly.

Hey kypdr, in regards to your login information, you should be able to see what your site is currently using by reviewing the "config.php" in the site root. Near the top it should give you the host, dbname & password. They recommend using a seperate database for this block/module, however it does work correctly if you use the standard Nuke database, simply make sure there is no prefix on the tables (ie. Nuke_finanical -> should simply be financial, without the nuke_).

To all other ppl, if your "Test IPN" comes back as successful, I'd recommend double checking your Paypal account to ensure that the Instant Notifications are still active. From time to time it seems Paypal resets these.... why??? I have no idea. Even with the IPN disabled on the Paypal site, the Test IPN WILL come back as successful (though it shouldn't if you ask me).

Again, don't know if anyone cares anymore, but hope this helps a little.

Peace Chizo OUT
 
View user's profile Send private message
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 ©