User Donated Amount?

Modifications for phpBB3.
Try the Mods here and share Your own Mods
Forum rules
You dont have to use ModX or make your mod AutoMod compatible. A simple textfile is fine
But if you post Mods here You also have to give support

User Donated Amount?

Post by vipaka »

Is there any way of recording/calling a variable for how much exactly a user has donated? I'm trying to write a mod to generate a certain amount of UPS points for each donation.

I looked at the donate.php script and it doesn't look like there is any such variable at all. It also looks like anyone can access the confirmation page.

User Donated Amount?

Post by Stoker »

vipaka wrote:Is there any way of recording/calling a variable for how much exactly a user has donated?
Im sure there is, but not the intention with this mod.
You practically need a new mod for this.
vipaka wrote:It also looks like anyone can access the confirmation page.
Anybody can access the cancel and/or the success page by using a direct link.
Like this:
donate.php?mode=success
donate.php?mode=cancel
But that shouldnt be a problem since nothing is recorded and no autogroup.

User Donated Amount?

Post by vipaka »

So it doesn't log the amount that each user donates anywhere in the db? Isn't that unreliable? If someone donates and then the payment doesn't transfer, how would anyone know?

Bleh...I hate the idea of having to make a whole new mod just for this feature... but its very important so I'll do it if I have to. :S

User Donated Amount?

Post by Stoker »

You get an email from paypal with the amount and name of user who donated.
That should be reliable enough ;)

User Donated Amount?

Post by vipaka »

I need to submit an additional value with the "Submit" button for this mod. How would I do that? Right now there is no $_post value for the submit button....at all. I'm kind of mystified for how it does anything at all(although it looks in the html like its calling a javascript paypal function).

Code: Select all

if($submit)
{

$insert_array = array( 
'user_id' => $user->data['user_id'],
'donation_amount' => $donation_amount,
);

// Might as well not ignore the ID since we have it
$sql = "INSERT INTO " . DONATION_KEY_TABLE . " " . $db->sql_build_array('INSERT', $insert_array);
$db->sql_query($sql);
}

User Donated Amount?

Post by Stoker »

Well, as I said before you need a new mod for this.

User Donated Amount?

Post by Vox Populi »

But the info is in the submit button, who's to say that is what they actually donated? You can say your are donating 100.00 but at PayPal you can change that to 10.00 or 5.00 or.....

I've thought about this quite a while my self. As Stoker says, yeah, we get an email confirmation from PP.

One of my stupid thoughts was to see if I could pull the information from the email... (crazy I know). I get the email and it forwards to my PM account and the info is pulled was my thought. But I am still not sure if that would work. Have had no time to play with it.

The other though was, why can't I pull the information from PayPal with my login??? It's pretty secure over there but maybe it can be done.

I guess this is why all the authors of a Donation MOD have it all set to manually institute amounts. I just post to my blog, the month and year Mr. John J. is a donator. I don't tell the amounts. I have a small community board with sizable donations a few times a year so I keep it quiet.

Hopefully I did not hijack your conversation.