Page 3 of 13

Re: [RC] Donation MOD with Multiple Payment Options

Posted: Wed Jun 13, 2012 10:02 am
by vipaka
Submitting any changes to the acp configuration page is generating a whole host of undefined constant errors in acp_donation.php from the set_config list. Also the "install.php" is generating errors for the donation_enable and donors_list_enable lines in functions.php.

Install.php works fine without those two lines in functions.php, would probably be best to set it up with an if exists ? : ; setup for those two variables. For the set_config list in acp_donation.php, putting the config names inside apostrophes fixes the issue.

change

Code: Select all

set_config(donation_enable, $donation_enable);
to

Code: Select all

set_config('donation_enable', $donation_enable);

and so forth. This same error occurs lower down for donation goal settings (just search set_config).

These three errors are showing up on the donate.php page.

Code: Select all

[phpBB Debug] PHP Notice: in file /donate.php on line 101: Undefined variable: paypal_preferred_currencies_list
[phpBB Debug] PHP Notice: in file /donate.php on line 106: Undefined variable: payza_preferred_currencies_list
[phpBB Debug] PHP Notice: in file /donate.php on line 111: Undefined variable: moneybookers_preferred_currencies_list
[phpBB Debug] PHP Notice: in file /donate.php on line 116: Undefined variable: libertyreserve_preferred_currencies_list
These are from the foreach lines

Code: Select all

foreach(array_unique(explode(',',$config['paypal_preferred_currencies'])) as $currency)
{
	$paypal_preferred_currencies_list .= "<option value='$currency'>$currency</option>\n";
}
Edit: Adding them as blank string variables above the foreach will fix the notices,

Code: Select all

$paypal_preferred_currencies_list = '';
but made me notice another error. The "dropdown" menus in the ACP for currency selection do not work, unless you manually type the currency into the text field. I don't feel like fixing this one for ya though since its work-aroundable, sorry!

The code below allows people to parse bbcode (default and custom) and smilies into their donation message through the acp text box (feel free to add this to the mod if you like it!)

right after the foreach collection in donate.php

Code: Select all

$uid = $bitfield = $options = '';
$allowed_bbcode = $allowed_smilies = $allowed_urls = true;

generate_text_for_storage($donation_config['donation_body'], $uid, $bitfield, $options, $allowed_bbcode, $allowed_smilies, $allowed_urls);
$donation_text_body["BBCODE_DONATION_BODY"] = generate_text_for_display($donation_config['donation_body'], $uid, $bitfield, $options);

$template->assign_block_vars('bbcode_body', $donation_text_body);
right after <h2>{L_BODY_TITLE}</h2> in the donate/body.html template file. (replaces the original plain text field)

Code: Select all

   <!-- BEGIN bbcode_body --> <p>{bbcode_body.BBCODE_DONATION_BODY}</p> <!-- END bbcode_body -->
Edit: Beyond the success page (which can be url-hacked) it doesn't appear that this mod "confirms" that a donation was successfully processed in any way. I have a version of an older donation mod for phpbb that has IPN confirmation if you'd like me to send you a copy for reference with the automated donor list and donation confirmation.

This is a great mod though, I'm really looking forward to how it develops. I really think it has more potential than any of the other currently available donation mods since it has more options. :)

Re: [RC] Donation MOD with Multiple Payment Options

Posted: Wed Jun 13, 2012 11:20 am
by Raul [ThE KuKa]
vipaka wrote:This is a great mod though, I'm really looking forward to how it develops. I really think it has more potential than any of the other currently available donation mods since it has more options. :)
+10

Re: [RC] Donation MOD with Multiple Payment Options

Posted: Wed Jun 13, 2012 4:36 pm
by Siropu
@vipaka, thanks for letting me know. I'm currently working on version 2.2.0 which will have a cleaner code and IPN features:

Auto group. (implemented)
Notify admin via PM when donation is received. (implemented)
Send a customized PM to donor. (implemented)

Each of these features have ACP options.

IPN integration progress: PayPal (implemented - not tested)

If I will have time, I will release it today. :)

Re: [RC] Donation MOD with Multiple Payment Options

Posted: Wed Jun 13, 2012 4:54 pm
by Raul [ThE KuKa]
Wonderful news, this new version will be great!!! ;)

Re: [RC] Donation MOD with Multiple Payment Options

Posted: Wed Jun 13, 2012 6:04 pm
by Prosk8er
Siropu, awesome your mod should deffinately be a big hit

Re: [RC] Donation MOD with Multiple Payment Options

Posted: Wed Jun 13, 2012 6:12 pm
by Jessica
Siropu wrote:@vipaka, thanks for letting me know. I'm currently working on version 2.2.0 which will have a cleaner code and IPN features:

Auto group. (implemented)
Notify admin via PM when donation is received. (implemented)
Send a customized PM to donor. (implemented)

Each of these features have ACP options.

IPN integration progress: PayPal (implemented - not tested)

If I will have time, I will release it today. :)
looking forward to it (:

Re: [RC] Donation MOD with Multiple Payment Options

Posted: Wed Jun 13, 2012 9:39 pm
by kmakoto
error with activate mode dubug
in install and acp configuration

Re: [RC] Donation MOD with Multiple Payment Options

Posted: Fri Jun 15, 2012 1:50 pm
by eunaumtenhoid
this mod is awesome

idea:

*integrate the goal config with the list of donors, so that at the time the user adm add a donor, the amount of the donation is automatically inserted into the goal.
*add support for bbcode in custom message.
*separate donatiosn for months

THX for mod^^

Re: [RC] Donation MOD with Multiple Payment Options

Posted: Fri Jun 15, 2012 5:30 pm
by Raul [ThE KuKa]
eunaumtenhoid wrote:idea:

*integrate the goal config with the list of donors, so that at the time the user adm add a donor, the amount of the donation is automatically inserted into the goal.
*add support for bbcode in custom message.
*separate donatiosn for months

THX for mod^^
+10

Re: [RC] Donation MOD with Multiple Payment Options

Posted: Sat Jun 16, 2012 7:23 pm
by Siropu
Version 2.2.0 beta is here!

What's new?
Now you can choose your preferred currencies by selecting them from a list.
Donor will be automatically added in the donors list after donating (IPN).


Auto-group (IPN).
The auto-group feature has 4 options:
  • enable/disable
    choose group
    make the group default or not
    select default group exceptions
PM notifications (IPN)
This feature has 4 options:
  • Notify admin via PM when a new donation is received (enable/disable).
    Send a customized PM to donor (enable/disable).
Download

This is a beta release because I want you guys to help me test the IPN Live (I don't like the sandbox :)). I've integrated the IPN for all payment options and now I have too see if it's working or not.

Re: [RC] Donation MOD with Multiple Payment Options

Posted: Sat Jun 16, 2012 9:24 pm
by eunaumtenhoid
thx dude, but forgive my ignorance, but what is IPN? and sandbox?
autogroup is only the name of add or an addon to the mod of the same name?

Re: [RC] Donation MOD with Multiple Payment Options

Posted: Sat Jun 16, 2012 10:17 pm
by vipaka
You're doing a great job! Getting out such a big update in such a short time is really impressive. :)

Unfortunately, the IPN check is not going through. As far as I can tell, the donations are still being processed correctly but nothing is calling the "donation_received" function from ipn.php.

Re: [RC] Donation MOD with Multiple Payment Options

Posted: Sat Jun 16, 2012 10:22 pm
by FB92
Good job. Will run a couple of tests and spot out bugs if I see any.

Re: [RC] Donation MOD with Multiple Payment Options

Posted: Sat Jun 16, 2012 10:46 pm
by Siropu
eunaumtenhoid wrote:thx dude, but forgive my ignorance, but what is IPN? and sandbox?
autogroup is only the name of add or an addon to the mod of the same name?
IPN (Instant Payment Notification) is a service offered by payment processors to help sellers validate a payment on their site.

The sandbox is a testing platform.
Auto-group is a feature that will automatically add the donor in a specified group.
vipaka wrote:You're doing a great job! Getting out such a big update in such a short time is really impressive. :)

Unfortunately, the IPN check is not going through. As far as I can tell, the donations are still being processed correctly but nothing is calling the "donation_received" function from ipn.php.
Thanks. :)
Did you tested the PayPal IPN? Using sandbox or live?

Re: [RC] Donation MOD with Multiple Payment Options

Posted: Sat Jun 16, 2012 10:46 pm
by vipaka
Siropu wrote:
eunaumtenhoid wrote:thx dude, but forgive my ignorance, but what is IPN? and sandbox?
autogroup is only the name of add or an addon to the mod of the same name?
IPN (Instant Payment Notification) is a service offered by payment processors to help sellers validate a payment on their site.

The sandbox is a testing platform.
Auto-group is a feature that will automatically add the donor in a specified group.
vipaka wrote:You're doing a great job! Getting out such a big update in such a short time is really impressive. :)

Unfortunately, the IPN check is not going through. As far as I can tell, the donations are still being processed correctly but nothing is calling the "donation_received" function from ipn.php.
Thanks. :)
Did you tested the PayPal IPN? Using sandbox or live?
Paypal, live.