PayPal IPN

I am creating a consumer 2 consumer website, similar to eBay but for books only. I am using PayPal's sandboxing environment to test the payment functionality.

I was wondering if it was possible to use IPN with both buyers and sellers. Reason being is a user may have a normal account(Non seller account), i want to be able to log in a database all payments from both parties. I am not able to do this with an buyer account.

The reason behind using IPN is just so all information can be logged in the database, would using IPN to do this be the correct way? is there an alternative?

I have successfully managed to get IPN working for a seller account by providing a url listener in PayPal under the relevant user, however i cannot do the same for a buyer.

I would appreciate any help i can get with this.

Thanks in advance.
MK15Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ray PaseurCommented:
The IPN is triggered by a payment; it is a payment notification.  The IPN is called when money is sent to a seller.  Information about the buyer is present in the data passed to the IPN.  So the answer is "Yes, you get both buyer and seller information in the IPN and you can log this information in your data base."

To see this in action, you might want to use var_dump() or error_log() to capture and present the raw post string that is received in the IPN.
0
MK15Author Commented:
I have been able to get it working by using a seller account, but i wanted the sort of functionality that is achieved when users purchase from eBay, where a user is not a seller but still is able to sell items.  I am able to do this with the email address but i have no way of recording the information, as notification option is not available to buyers in the sandbox environment.
0
MK15Author Commented:
for example

if i use a buyers e-mail address, i.e. buyer123@lala.com.
i would not receive IPN based on this address.

If i use sellers address i.e. seller123@lalal.com.
i would get a response from IPN. Thus can store item number, buyer and seller email etc

I need to achieve notification from both types of users in order for me to store it in a database
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Ray PaseurCommented:
a user is not a seller but still is able to sell items
Maybe I am missing a basic definition of the terms here.

The IPN is triggered by payment after a sale.  Each PayPal account can have one IPN.  The IPN has a lot of information passed to it, including the identity of the buyer and the seller, as given by their email addresses.  You can capture the email address of the buyer in the IPN and send an email from the IPN script to the buyer.  In fact, you can send the email anywhere (or make data base updates, or call web services, etc).  One of my clients uses the IPN to do a bill-of-materials explosion and trigger factory orders.  It is really very powerful if it is programmed correctly.

But let me ask an architectural question... Why would any user have a different account from any other user? Why not just make it a peer-to-peer network where all clients are treated the same?  It would seem to me that the entire design and programming would be much easier that way.  Then you would not have to deal with different classes of users.

Some of my friends like this service:
http://bookmooch.com/

And this article is rather old, but it shows some ideas about book exchanges.
http://www.guardian.co.uk/books/2011/feb/16/new-sites-kindle-lendle
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MK15Author Commented:
yes i totally agree, i shall make all test accounts the same as it would make the process more seamless.


Once again thank you. :)
0
Ray PaseurCommented:
I think you'll find that design pattern much easier to work with.  Thanks for the points, ~Ray
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
E-Commerce

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.