not getting any PayPal IPN - paypal

i am trying to implement paypal payment system on my website.
i am kinda stuck at receiving IPNs.
the website is developed in PHP, on ZendFramework and Doctrine 1.2.3
i used the example script located on paypal site for receiving IPNs, however it doesn't work.
for debugging purposes i left on the IPN page code that just inserts a new entry in a table in my mysql db, so every time i load the page, a new entry is inserted in the DB.
i tried again to use Instant Payment Notification (IPN) simulator from PayPal and try to send a new IPN to that page, however nothing is inserted in the DB, so my best guess is somehow paypal can't reach my page, even though it says IPN successfully sent.
the ipn url is something like: http://mydomain.com/shop/paypal/ipn

i finally got it.
as it seems, paypal does not send IPN data to urls like: domain.com/shop/ipn .
i created a separate php file, not related to the framework i use so the ipn url looks like: domain.com/ipn.php . now everything works.

I am getting back with a proper answer.
The reason it didn't work wasn't any paypal ipn url-form restriction.i used Zend_Translate for multilanguage suport and used as default language what the visitor browser was sending me back.problem was when paypal was sending me IPN it did not provide any default language, which generated an exception in my code and an application crash, so no IPN got received.
Furthermore, if anyone needs to have custom URLs in Zend they can use Zend_Controller_Router_Route_Regex, more information here:
http://framework.zend.com/manual/1.10/en/zend.controller.router.html#zend.controller.router.routes.regex

Related

PayPal IPN hook isn't called

I have set the IPN hook to a PHP script on my site using
https://www.sandbox.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-ipn-notify
I have set a return page at
https://www.sandbox.paypal.com/businessmanage/preferences/website
Neither works. IPN is not called, transaction succeeds, but i am not redirected to "thank you" page.
Could you suggest what is wrong?
The page I use for payments at sandbox:
https://market.snowcron.com/cabinet_paypal.php
This question asks about 2 separate issues
For the IPN issue, check your sandbox IPN history at https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_display-ipns-history , and test your IPN listener using the simulator
As for the redirect URL you have set, this only applies to old-style HTML form payment standard integrations. That setting has absolutely no effect for newer API or JavaScript SDK based integrations. Any redirection you wish to perform should be in the onApprove javascript function.

PayPal IPN - Auto return

I'm developing a merchant website and I'm working with Paypal right now.
I found that using IPN and the auto return do the job I want.
I'm using NGROK to expose my localhost and everything works fine. However, when I take a look at NGROK terminal I see that PayPal is actually sending datas to my auto-return page first and THEN after something like 3 seconds sending the rest to my IPN file.
I did think that the right data processing was IPN then SUCCESS... Am I wrong? Is that because I'm using NGROK or localhost? Or maybe PayPal Sandbox?
It sounds like you're mixing up PDT and IPN.
PDT = Payment Data Transfer. This is meant for use with Auto-Return, and the payment data gets sent back to your return URL so you can display it on screen. Database updates, email notifications, etc. should NOT be taking place here because there is no guarantee the user will make it back to the return URL even with Auto-Return enabled.
IPN = Instant Payment Notification. This is meant for post-transaction processing and is where you should handle db updates, email notifications, and anything else you need to make sure happens every time a transaction occurs. IPN also allows you to process things like e-check updates, refunds, customer disputes, etc. where no browser interaction was taking place at the time.
You can use both together, but the PDT URL and IPN URL should be different from each other. The PDT URL would be your return / thank you page, and again you would only display data here for the user's reference. The IPN URL would be a separate script that acts as a listener only.

PayPal stripping variables on the return url query

Yesterday I was notified that a site I administer wasn't sending e-mail notifications of successful orders to clients and to the assigned people in charge of processing the order for shipment.
I made a test transaction and noticed that the return url given on the generated html of the payment button which has 2 variables like this:
http://example.com/return?var1=something&var2=something2
Was stripped by paypal to:
http://example.com/return?var1=something
Also the ipn notification wasn't triggered correctly and also the ipn url makes use of more than 1 GET variables which it seems that paypal is also stripping.
I found this other report here on stackoverflow:
QueryString values removed from the IPN endpoint by PayPal
It answers lots of questions, but the big question is:
¿Should I wait for paypal to finish whatever they are doing on their backend or should I make changes to my codebase that adapt to this undocumented changes?
Other references:
PayPal IPN Unexpected Changes
I received a response from PayPal today (3/15) that they have fixed the issue. (I submitted a report on ~3/10.) Hopefully it is fully resolved and you won't have to make any modifications.

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

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.

Paypal notify url not working showing latest delivery date in 1985?

We are having some problems with paypal:
Notify url and status appears empty in the message details page.
The retry date on the ipn message appears in 1985:
What can we do to fix this, besides get back in time to catch that retry?
Overview:
We use basic payments
We use the notify_url param from a php redirection
it worked perfectly on sandbox and live, until you updated
The paypal ipn transaction shows the correct custom parameter
Server side:
Php + custom framework.
There are currently some issues with IPN, that are being addressed that should resolve this issue once they are fixed. If you would like to be notified once the issue is resolved, you can open up a ticket with PayPal Merchant Technical Support.
user1214454: I have the same problem which I have described here:
https://stackoverflow.com/questions/16174275/why-paypal-does-not-call-my-notify-url-but-on-sandbox-everything-works
I have contacted with PayPal but they said that paypal are sending the IPN messages to my IPN, but they are not being accepted by my IPN, what I think is not true, because when request hit my server e-mail is generated by my script and I know if something hit my server. Besides, as I said in my post in sandbox everything works as expected. I am really frustrated too because my bussiness depends on this.