I have set up a Buy Now button on my website.
Upon transaction being completed I then direct the PayPal data to a script on my server.
What I need to know is, is the data sent by the Buy Now button the same as that sent when using the IPN Simulator?
If not, where do I find a list of the variables/data sent by the Buy Now button?
Yes, IPN simulator Web Accept Transaction Type should simulate the same information back to your IPN listener.
This is the documentation link for all the IPN variable that PayPal will returned to your listener.
https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNandPDTVariables/
Related
I have a question about Paypal IPN, I was wondering when does the IPN activate and send it's message to my website.
I currently have my website that has a buy button. When the client buy the service, he is directed to paypal. Once he pay the service, nothing happen. In order for me to receive the IPN notification, the user has to click "Return to merchant website" or whatever the link is, then I receive the IPN notification.
Is it normal, does it work like that for everyone?
Cause right now, most people when they are done with the payment, just close the website and I don't receive any notification.
Thanks for any help !
Your question leaves a lot of missing information so I will go through each option for you:
Read here about how to setup a sandbox account if you don't already have one: https://developer.paypal.com/docs/classic/lifecycle/sb_create-accounts/
Bare in mind that your sandbox account is entirely separate in every way from your live paypal account. All settings will need to be checked and customised as needed.
Set up your IPN URL on your sandbox account Here: https://www.sandbox.paypal.com/uk/cgi-bin/webscr?cmd=_profile-ipn-notify
Once set up, you then need to download and set your code (PHP or something else) to the listener (referenced in the above sandbox profile link). You can find IPN code examples here: https://github.com/paypal/ipn-code-samples
When that's all set you need to set your listener to using the sandbox mode and then log in to your live account and then run the IPN simulator from here: https://developer.paypal.com/developer/ipnSimulator/
Paypal will send messages to your IPN listener and you need to do something with the messages, typically output them into some sort of log file. Any issues, you can read Paypals feedback and IPN data/delivery information here https://www.sandbox.paypal.com/uk/cgi-bin/webscr?cmd=_display-ipns-history&nav=0.3.4 [Found from History->ipnHistory on the Paypal menu] and it should list them out. You can resend any failed or queued or undelivered messages.
Paypal is a terribly documented and terribly structured system for coding with. I hate it. Use Stripe.
I love bullet points.
Paypal claims they will try and resend failed/queued IPNs 16 times over 5 days. I have yet to see this, you need to resend them manually (at least, sandbox ones)
Please remember all the settings and changes you have made to your Sandbox account will need to be also made to your live account before you make your payment system live!
Solution
My return_URL is the location of my IPN.php file which take care of the data sent and received. My problem is that the IPN is only firing when I click the "Return to merchant website" and not when the payment is actually completed
What you have done, from reading your comments, is set your IPN page to being your return from paypal page, this is NOT the way IPN is supposed to work, the IPN page should never be visited by the customer, only ever by Paypal.
Read through my anwser (points 2,3,4) and set up your IPN web link as I have described above, your return_url value should be a basic page to say to the customer "transaction complete". The IPN page is defined on your paypal accounts (sandbox and live) as I stated above.
This will fix your problem.
I have read about paypal IPN but that has delays in notification.
I watched this video on setting up a paypal subscription button
http://www.youtube.com/watch?v=jHC9BoRDEOY
but the thing I am missing is that I add a url that paypal will go to after payment. When this url is hit, I need to immediately verify that payment was made(ie. I want it so if a user goes to that url without paying, we don't accidentally continue the process since he has not paid yet).
so, how can I
1. have paypal feed me some kind of unique id when it brings up my url
2. call back to paypal to verify that payment as been made.
Lastly, how can I test this all out on the paypal sandbox to make sure everything is working together?
thanks,
Dean
I did find this but this is not using the buttons at all. Is there not a way to use the buttons?
https://developer.paypal.com/docs/classic/express-checkout/ht_ec-recurringPaymentProfile-curl-etc/
thanks,
Dean
My developer is trying to get the instant payment notifications for one of my web products to be sent to a secondary email, not the primary Paypal one. But no luck so far -it keeps getting sent to my primary email. I'd like some help on how to get it sent to a secondary email account?
Thank you
Your email address doesn't have anything to do with where the IPN gets sent. You basically have 2 options for configuring IPN.
1) Log in to the PayPal account that is receiving the payments, go into the profile, and then into Instant Payment Notification Preferences. Enable it, and add the URL to your IPN listener. This will now act as a default IPN listener so every transaction that hits your PayPal account will send an IPN to this URL.
2) If you include a notify URL in your button code or API calls this will override what you have setup in your profile. If you need to send IPN's for a specific button or API call to a secondary IPN listener you can just add that URL to the notify value for the request and that's where the IPN's will go.
If you need IPN's to hit multiple scripts you might want to take a look at this article I wrote awhile back about daisy-chaining PayPal IPN scripts.
We have an IPN listener already from integration of another paypal api. Now I want am trying to intregate a payment button to a web soolution, which should then be able to report to the existing IPN listener.
I have a login to the paypal devlopers site. I see the IPN simulator there but as I understand it that allows me to create a message and send it manually. Is there any way to configure my sandbox account to send IPN notifications to the listener when I send a click from the web button to the sandbox. In other words I want the IPN message to be created based on the info I send with the web button, in the same way as it would in the live system, not to be my guess as to what message will be created then. I don't see where to configure the address I want notifications sent to other than for the simulator.
Also, is there any way to test with a currency other than USD?
Thanks,
Adam
For IPN, the easiest way is to pass the URL of your IPN handler in the notify_url variable of your button.
Currency codes can be tested by passing the currency code in the currency_code variable of your button. A list of currencies PayPal supports can be found at https://developer.paypal.com/webapps/developer/docs/classic/api/currency_codes/ .
I have downloaded sample code from paypal to allow me to use parallel payments via their sandbox accounts. When I run parallel.php, I get redirected to paypal's sandbox login page.
How am I supposed to know "server side" that the payment has been made successfully, so I can update my database records?
I believe you have to work with PayPals IPN system. This will basically send a confirmation to your server that tells you it has gone through.
https://www.paypal.com/ipn
Paypal lets you register a notification url which is part of the IPN (instant payment notification IIRC) system. So if someone pays by a delayed payment (such as a bank transfer) the transaction will update days later. You need to have an application (web page) on your server that can be called by Paypal with transaction details to update a payment.
You'll need to create an initial transaction record in your system when paypal redirects back to you so refer to their documentation for that. I'd also recommend looking at either OSCommerce or Zen cart for an idea of how they do it as they support the same kind of thing.