User Donated Amount?

Download and support for PhpBB3 Paypal Donation Mod
Locked
vipaka
BBCoder I
BBCoder I
Posts: 3
Joined: 12 Feb 2012, 22:01
BBCodes: 14

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 avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

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.
Board rules! No PM support
vipaka
BBCoder I
BBCoder I
Posts: 3
Joined: 12 Feb 2012, 22:01
BBCodes: 14

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 avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

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 ;)
Board rules! No PM support
vipaka
BBCoder I
BBCoder I
Posts: 3
Joined: 12 Feb 2012, 22:01
BBCodes: 14

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 avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

User Donated Amount?

Post by Stoker »

Well, as I said before you need a new mod for this.
Board rules! No PM support
User avatar
Vox Populi
BBCoder III
BBCoder III
Posts: 135
Joined: 27 Jul 2011, 15:44
BBCodes: 51
Favourite BBCode: YouTube
Favourite MOD: mChat, Welcome on Index
Location: Index,WA
Contact:

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.
Be who you are and say what you feel.
Those who mind don't matter.
Those who matter don't mind.
- Dr. Seuss
Locked