tags:

views:

58

answers:

5

I want to achieve something like this

http://depositfiles.com/en/gold/payment.php

I have normal users signed up. I want them to upgrade to premium user. Once a person pays, how do I know which user he was signed in ? How do i force the user to login first before being able to click the paypal button and make payment ? Otherwise, I would receive money, but wouldn't know which user to mark as "PAID" in my database.

when you click on the paypal button, it redirects you to the paypal page where you can login and pay.

I also want to accept Visa and Mastercards, is it doable through paypal using the same method ?

A: 

The information you need is in paypal web site.

Chathuranga Chandrasekara
A: 

This needs a lot more details than you currently provide. What language have you written your website in? Static HTML? Ruby? PHP? How does PayPal's payment system work?

Mike
the tag says php
wpiri
A: 

You pass this information over using this:

<input type="hidden" value="USERINFOHERE" name="custom"/>

Put any sort of user verification info in the custom field. Could be a hash, user ID, anything identifying the user. PayPal will pass the information in the custom field to your IPN.

KramerC
+1  A: 

Paypal's information can be found here: Part 1
You can create a subscribe button for each type of subscription you want and use the HTML variables in Part 2 to enable you to know what type of product and what user is included in the invoice.

Arch
Arch
Throwing https://developer.paypal.com/ to the linkage as well.
Gordon
A: 

normally the way it will work is that your site will pass information to paypal (http://paypal.sourceforge.net/ is one toolkit that seems to be made for php, thought I've never used it so I can't really promise its not abandonware).

once the paypal transaction is completed successfully, control is passed back to your site. you can then set the user's flag in your database as a premium user.

as far as I can tell, you tell paypal to handle payments for you, and the user picks a funding source in paypal. if you want to have visa/mastercard separately handled from paypal you'll need another payment gateway to handle it, like mirapay or something else.

Oren Mazor