Solved

PayPal IPN

Posted on 2012-03-28
6
650 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 110

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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 110

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 110

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
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.
The viewer will learn how to count occurrences of each item in an array.
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…

733 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