homepage Welcome to WebmasterWorld Guest from 54.197.108.124
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / WebmasterWorld / Ecommerce
Forum Library, Charter, Moderators: buckworks

Ecommerce Forum

    
Registration after payment with Paypal.
scraptoft




msg:3994094
 1:23 pm on Sep 23, 2009 (gmt 0)

Hi,

I have a client that wants to offer a paid membership area using paypal.

So far I have set up a website payment standard button.

The process:

Buy button -> User pays -> User redirected to account registration page and fills in their email & password -> user database is updated with email,password & paid=yes.

How can I carry a variable to the registration page so I can insert into the database that the user has paid?

What I don't want is people to get hold of the registration url so they can bypass the payment stage.

Is it possible? i've been reading the paypal library forever and can't find anything.

 

scraptoft




msg:4000416
 1:24 pm on Oct 3, 2009 (gmt 0)

Nobody done this before?

wyweb




msg:4000420
 1:27 pm on Oct 3, 2009 (gmt 0)

Encrypt it. There's an option to do that when you're setting up the payment button.

p1lky




msg:4000467
 4:23 pm on Oct 3, 2009 (gmt 0)

look for IPN (Instant Payment Notification) on PayPal
The url on your website that the user gets sent to has a key appended, you send this key back to PayPal to verify

scraptoft




msg:4008175
 12:04 pm on Oct 16, 2009 (gmt 0)

Unfortunately can't find either of those options when trying to create a paypal standard button.

p1lky




msg:4008378
 5:37 pm on Oct 16, 2009 (gmt 0)

when you create the payment button, you add a callback url that PayPal sends the user back to on your website when the payment process is complete. PayPal sends additional data back to this url.

Verifying this data is a lot more advanced than creating a standard button. It's part of the PayPal API, documentation and examples are on PayPal

rocknbil




msg:4008452
 7:18 pm on Oct 16, 2009 (gmt 0)

Yes, IPN is the way to go, and it's not all that difficult.

You have to read the IPN docs, but it works like this.

You go into payPal and enable IPN, enter the URL to the "listener" script described below. Whenever a payment is made, it sends a token to the listener script.

You create some script, let's call it a "listener" script. All it does is "listen" for a message sent from paypal. What payPal sends is a transaction id when a payment is complete. This is particularly cool if someone pays via eCheck, which can take up to three days to clear - three days later, the payment clears and the IPN token is sent to your listener script.

Within the listener script you have to post back to payPal using curl and append the token with "&cmd=_notify-validate." Note: this SHOULD be done over https, and there's a thread around here about non-https IPN functions failing, don't know if this is temporary or permanent.

Within your listener script, if the response is VERIFIED, you update your database.

This allows you to eliminate a lot of user error. In your scenario, the user is making a payment and you are "hoping" they click the link to "return to merchant." If they don't, the whole thing falls down.

With IPN, they enter all their info FIRST, and you add it to the database, but your database has, say, a "transaction_complete" field that is set to 0. Then they are sent on to make the payment.

If they don't use the "return to merchant" link, the IPN completes the process for them, and your listener script sets "transaction_complete" to 1, eliminating user error.

scraptoft




msg:4009106
 9:39 pm on Oct 18, 2009 (gmt 0)

Thanks guys that was very helpful. Got it sorted now you steered me in the right direction.

Much appreciated!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Ecommerce
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved