Ipn simulator Echeck completion response for not sending 'subscr_id' for recurring payments - paypal

I have created response for recurring payments using ipnsimulator. ipnsimulator send transaction details without subscr_id. How can I get subscr_id for recurring payments using ipnsimulator?

Unfortunately, the IPN Simulator is not yet setup to include subscriptions or recurring payments. You'll need to find a sample of what IPN's look like for a given transaction (which you can find with Google, of course) and then you can create your own simulator. Samples are provided at http://developer.paypal.com in the docs, but they're kind of buried so Google really is faster.
You can build your own simulator by creating a basic HTML form with the action set to your IPN URL. Include hidden fields in the form with names/values that you would expect to get from an actual PayPal IPN based on samples you find. Then you can load this in a browser and submit it manually to trigger the simulated IPN. This can help with troubleshooting script problems, too, because you can see the result on screen.
Keep in mind that when testing this way the IPN data is not coming from PayPal's server. Therefore, the verification will come back as INVALID. Just make sure you remember that if you're building logic around VERIFIED or INVALID IPN results, and adjust accordingly.

Related

Paypal IPN not firing?

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.

Paypal IPN: my domain suffix appears twice

I am setting up my IPN for PayPal its been tested using a send box account and the site worked.
Now that I have gone live I am testing using real money and the ipn set up is
www.mysite.co.uk/XXXXXXXXX
However when I make the payment I notice in the url reply on my browser and when I check the IPN history on Paypal it says www.mysite.co.uk.co.uk. The.co.uk` appears twice. I assume this is the reason I am not getting the orders finalised on my backend.
There are two places you can specify the IPN listener URL:
your PayPal profile, or
with your transaction
It's very likely to be caused by mis-configuration in either of the two places.
If you specified it with your transaction, depending on the product you use, you may be able to find it in a parameter similar to "notify_url" or "PAYMENTREQUEST_0_NOTIFYURL". You'd need to refer to the documents of the product you are using.

Paypal IPN payment_status

I'm trying to use paypal ipn on my website. I am using sandbox to debug it...
I noticed sometimes I get values on payment_status like pending ...
My question is, do I get a response again from paypal ipn when this payment becomes complete?
Yes you do. That is the reason why you should implement logic in your code to cope for multiple messages relating to the same transaction.
From paypal site: https://cms.paypal.com/es/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_testing_SBOverview
"The PayPal Sandbox is a self-contained environment within which you can prototype and test PayPal features and APIs. The PayPal Sandbox is an almost identical copy of the live PayPal website"
Comparison table in the link above does mention some scenarios like Fraud detection are not enabled in sandbox.
Other than these, it should be safer to assume that features of live are same in sandbox ( like receiving IPN after status change from pending to complete etc).

Paypal does not Call IPN Script when payment is made from paypal.co.uk

I have developed one regular paypal form along with IPN script(in PHP).
When I make the payment using sandbox, everything works fine and flawlessly !
But when the form goes live, it doesn't even call the IPN.
Please note that the live payment is made through paypal.co.uk.. and Form submits data to paypal.com.
So, I think this is happening due to paypal.co.uk.
Is it so ?
Is there any solution for this ?
No. Your IPN script is likely still configured to verify the IPN data at https://www.sandbox.paypal.com/ instead of https://www.paypal.com/, which will cause it to fail, which in turn will cause the script not to get executed.
You can review individual IPN messages to were sent for your account in History > IPN History on your PayPal account overview as well.

How do I deal with PayPal customers who can't direct return

PayPal states:
Note: If you have turned on Auto
Return and have chosen to turn on
PayPal Account Optional for new users,
a new user will not be automatically
directed back to your website, but
will be given the option to return.
But if some of the customers don't get "Auto Returned", how do I handle them programmatically?
Paypal does not guarantee autoreturn especially when Paypal Account - optional setting is on.
The right way to handle the integration is with Instant Payment Notification (IPN) option. Using IPN Paypal will make POSTS to your page notifying you of payment events. The following link explains the IPN process pretty well.
To summarize, you will write code that will trap posts from Paypal and then make sure to update your billing data accordingly.
Also, IPN messages might be slightly delayed.
Create a script (cron or what) that does check for such payments at paypal perodically (e.g. every hour).
Is this what you mean?
https://www.paypal.com/cgi-bin/webscr?cmd=p/mer/express_return_summary-outside
If not, you may need to be a little more specific with your question. Like - are you using paypal pro? How are your customers checking out? etc. And now that I read the answer below mine, I wonder if you are even talking about the payment process and not something else.