?
Solved

PayPal IPN

Posted on 2012-03-28
6
Medium Priority
?
660 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 111

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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 111

Accepted Solution

by:
Ray Paseur earned 2000 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 111

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
Suggested Courses

765 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