问题
The situation is as follows: there's a website that connects sellers and buyers, like Ebay.
Among other things the owner of the website needs to know the details of each transaction initialized from there. Essentially I am looking for a payment method that returns a digital receipt.
Is it possible to do something like that with PayPal?
回答1:
Of course you can do it like this.
Couple of things that you will have to do:
- Have sellers register their PayPal information with. Lets say in "sellers" table, with merchant email/ merchant id as primary key.
- Sellers will have to setup IPN URL on their PayPal accounts. There url will have to point to the IPN handler that you will create
- Handle the IPN, check this out http://boolcast.com/joomla/3-development/13-joomla-custom-paypal-ipn. I wrote that PayPal IPN handler for Joomla a while back, you can eaily modify it and use it for what you need (you will have to remove merchant info from config). Also here is a list of IPN vars that you will receive https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_admin_IPNReference
- If IPN is good, While handling the IPN check the receiver_email and/or receiver_id to determine who is the seller. You can retrieve the seller information from "sellers" table by the email/merchange_id. At this point you can generate all kinds of notifications to seller/buyer/yourself/etc...
Things to note:
- You will not be able to use merchant ID if non primary PayPal user will be creating PayPal button.
- List of IPN variables will depend on the type of payment and how it is submitted
- ALWAYS use PayPal Sandbox
回答2:
This has nothing to do with PayPal. Your notification of this "market website" needs to be done in your own code.
So yes, it is possible.
来源:https://stackoverflow.com/questions/3620864/can-a-paypal-transaction-include-a-third-party