Solved

PayPal IPN

Posted on 2012-03-28
6
648 Views
Last Modified: 2016-03-24
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.
0
Comment
Question by:MK15
  • 3
  • 3
6 Comments
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 37776384
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
 

Author Comment

by:MK15
ID: 37776423
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
 

Author Comment

by:MK15
ID: 37776435
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 108

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 37776500
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
 

Author Comment

by:MK15
ID: 37776547
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
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 37776638
I think you'll find that design pattern much easier to work with.  Thanks for the points, ~Ray
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to create a scatter graph with straight lines 6 28
PHP Healthcheck 2 85
phpmyadmin 3 33
Saving image into server to get url later 1 31
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Every business owner understands the significance of online customer reviews and the impact it can have on sales and revenues. With technology advancing at such a rapid pace, getting online reviews has never been easier, especially when many regions…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now