Customizing SMF > SMF Coding Discussion

2.0.2 add a member to group

<< < (6/6)

repxl:

--- Quote from: Arantor on July 03, 2012, 12:27:14 PM ---What IPN callback file?

Here's the thing: when you send to PayPal you need to send something identifying the user and a secret.

I still don't know why you're trying to make this way more complicated than it needs to be. You can quite easily put your own purchase button in, but pointing to all the code that SMF uses...

--- End quote ---

dont worry i have all work done all is done what im missing is that the add / remove ssi.php functions will work without admin login ...


--- Code: --- <form class="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="my email i hide it for now"> 
<input type="hidden" name="item_name" value="Premium for your server">
<input type="hidden" name="item_number" value="1">
<input type="hidden" name="amount" value="4.99">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="return" value="http://www.fresharea.net/user">
<input type="hidden" name="cancel_return" value="http://www.fresharea.net/user">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="notify_url" value="http://www.fresharea.net/ipn.php">
<input type="hidden" name="custom" value="<?php echo $user_info['id']; ?>">
<input type="submit" value="Buy Premium - Paypal">
</form>
--- End code ---


there you see im getting the users id and then in the callback.php i check for all this if its true and ofc if the payment was sucessfully ... this allowes me the instant payment notification at paypal . ;)

repxl:
so you can help me ? :/

Arantor:
Jeesh, you're impatient. I do have other things to do instead of just sitting here trying to figure out the mess of coding you have.

Oh, and that form is insecure. It's going to be possible for users to upgrade their account without paying by falsifying the input to the IPN. And will be trivial to do, too.

-sigh- I don't see any point in trying to explain to you how many things are wrong with your approach, so we might as well get it over with.

Are you wanting to change the user's primary group or add them to a secondary group? The queries are very different.

Navigation

[0] Message Index

[*] Previous page

Go to full version