Paypal IPN Simulator (Different Sites, different results) - paypal-ipn

This is leading me into confusion only. After reading Paypal's documentation for Paypal IPN, I know how to get to the Simulator page and trigger an IPN test. Reading throughout PP's documentation, the page I am lead to is:
https://developer.paypal.com/developer/ipnSimulator/
Now, on my server side, I have used one of PP's Listenter example file in which I've implemented my own class to log everything I need into text files, and, I know that my IPN Listener is up, running and receiving requests from the IPN Simulator because I can see it all beeing logged.
Now the intriguing part is that, as I said before, i'm lead to the aforementioned page, which triggers an INVALID response from Paypal every single time I simulate a payment. Afters dozens of forums read, including SO, I have seen some people using https://developer.paypal.com/webapps/developer/applications/ipn_simulator instead of the former one.
If I use this latter URL, the simulation works without a hitch and I get the "VERIFIED" response, everytime. At this point, the question I cannot answer is "Why?". Why does this only works on the latter URL, and not on the URL that I am redirected to from within my paypal account, which is the one I think it was supposed to work from? And this constitutes by itself another problem. I cannot access this latter URL from anywhere within my paypal account, unless I manually enter it. You may question how did I get to this second URL. Well, I got it from other people's posts, otherwise I didn't even know it existed. So, right now I am completly lost and with this said,
Is there anyone that can explain me the difference from both URLs, and why is the second one not available inside my PP account?
If you can also explain me why the simulation works from the second URL only, that would be a bonus
NOTE: By the way, I've tried it and I know that in Live mode it works also, and I get the VERIFIED response.

Related

PayPal merchant and session destruction

I wonder if somebody came across with the next situation:
After the payment flow, I click the link "Return to Merchant"
and I go back to my website but unfortunately my session is destroyed.
Did somebody face an identical situation?
Update: I've made an empty form
, I mean that it works on its own without any engine's script. And the problem is in existence. 2-3 times out of 10 it works incorrectly. I can't catch a cause. When the problem occurs, the browser doesn't send cookies
and sends if works
The best solution is to simply not redirect the user away from your site, and keep it loaded in the background. This gives the best experience, as they are not sent to a possibly-unfamiliar PayPal checkout with no context.
Make two routes on your server, one for 'Create Order' and one for 'Capture Order', documented here. These routes should return only JSON data (no HTML or text). The latter one should (on success) store the payment details in your database before it does the return.
Pair those two routes with the following approval flow: https://developer.paypal.com/demo/checkout/#/pattern/server

Can you generate new PayPal IPNs for past (IPN-less) transactions?

So I'm working with a system that uses the legacy NVP/IPN thing from PayPal. The IPN listener URL wasn't set up properly and so they ran a couple weeks worth of transactions with no IPN data coming back. I've set it up properly now, but I'm wondering if there is a way to regenerate that last couple weeks that never had any. Whenever I go to the IPN history page, I just get a this feature is not available message. I know it's now working because I can see three transactions in our database (that come through the IPN listener)
On another note, if I go to the download history page and try to click download, the page refreshes but nothing happens. I don't get a report or anything, any idea why?
It sounds as though you're looking for the IPN history page, where you can resend IPNs: https://www.paypal.com/us/cgi-bin/webscr?cmd=_display-ipns-history
Late edit: changed title to better reflect the true question (it's not about regenerating IPNs). And the answer is it's not possible. Instead, for past IPN-less activity one must manually import a CSV obtained from www.paypal.com account home -> Reports -> Activity Download
This is the URL: https://business.paypal.com/merchantdata/reportHome
If once in the Activity Download, "Create Report" does not work properly (e.g. "nothing happens"), contact PayPal's support for assistance as that is not normal.

Facebook Developer Account always disabled after couple of days of using Messenger API

This is not exactly a programming related question but it is closely related to developing so I think it is pertinent.
I´ve been charged in my work with developing an app with access to Facebook Messenger. I needed a Facebook Account and I didn´t want to use a personal one (and I don´t use Facebook anyway) so I created a new gmail account to use it to sign up in Facebook, as user and as a developer.
After a couple of days of work, having created the page, my webhook, done some tests, etc., and investing a good deal of work hours, my account appeared as disabled.
I have to admit a didn´t use much of real info on this account (I´m kind of allergic to disclosing personal information unless mandatory), and the account was new so I thought that maybe that was the reason (they don´t give you any).
So I tried again a second time with an account I had been using for years (just for logging in some sites, not much of real information there neither, as I say I don´t really use Facebook), and after a couple of days, same results, locked account.
I can´t stress enough I don´t use the API extensively, I just send some messages to another user I have added as one of the application developers so I can test (that other account is never blocked, by the way). It´s not like I am sending hundreds of messages or anything like it. And by the way, I have never been blocked while I was doing something (so I could indentify my wrongdoing). It just happened that at some point when I was going back to work (first hour in the morning, or after lunch for example) I tried to log in again and then I got the warning.
So I have tried a third time, this time I have given all my real information, reluctantly uploaded a personal picture, given all my data to Facebook (yikes!).
And after a couple of days: damn, same result. Blocked account. Work lost. They prompt you to upload a picture to check your Id, but to no avail (no answer yet, not even a notice of any kind) and they don´t give you absolutely any reason why the have blocked you.
And if I go to https://facebook.com/help/contact/260749603972907 to fill the form where they ask you to upload an ID then it says that the email doesn´t belong to a disabled account!
What is the unusual activity they have detected? What have I done wrong? Has someone experienced the same problem? Has someone got any clue of what it is that I could be doing wrong?
Because I don´t want to go through the whole process once again only to get blocked in a couple of days.
Thanks.
EDIT 1:
Ok, after checking again now it recognizes the account as a disabled one. I have gone to https://facebook.com/help/contact/260749603972907 to fill the form and I have uploaded my ID (even though I completely disagree with disclosing that kind of information).
Honestly, I don´t know what it means by "shortly". It´s been two days now and I have not received any kind of notification yet.
By the way, I haven´t received any kind of notification (mail, sms, anything) during any step of the process EVER. No one. Nothing. Not even an automatic email response. Plain absolute silence.
Honestly, if Facebook uses a security system like this, that lets hackers in while blocks legitimate users, creating false positives and making us lose many hours of work, without any reason or notification or explanation, then Facebook security is plain wrecked.
And I cannot do anything less than to strongly discourage any developer to use it if they can avoid it (what unfortunately I can´t).
EDIT 2:
After some days I regained access to my account again. Without any notification, I just tried again and now it worked (really good communication policy, Facebook, congratulations).
My App had disappeared, so I had to go through the whole process again. And after sending ONE message to the API, this again:
And once again the asked me to upload a picture of myself (I think they already have enough pictures of me to make an album).
This is just plain crazy.

paypal express checkout digital goods testing in sandbox

I used PayPal's Integration Wiz to generate the code (PHP) for the Express Checkout Digital Goods functionality. I'll admit, I made a few minor changes to it so that it could work with my site... My site is a single page Angular.js app - so I need to pass back parameters to the app, and not go back to a different page (as it is, I'm not keen on leaving the page at all, but I'm not ready to shell out for a business pro account yet.. the PCI compliance is something I don't relish being on the hook for...but maybe one day... certainly not until I know I can get "basic" things working).
I would not expect any of my changes (basically changing the hardcoded URLS to being PHP session vars) to interrupt any of the flow of the Integration Wiz's processing.
However, when I test things in the sanbox, the process stops at the point of redirection to:
https://www.sandbox.paypal.com/incontext?token={somevariabletokenconent}
The token always starts with "EC-" so I'm assuming this is telling me I've been able to successfully start the Express Checkout process.
All I am seeing is a blank page, with Chrome telling me I'm getting:
Failed to load resource: net::ERR_CONNECTION_RESET
AFAICT my sandbox account is set up for EC/DG:
Your payment solution: PayPal Digital Goods (Express Checkout)
I HAVE updated my sandbox details in paypalfunctions.php
And other than the changes in checkout.php, I havent messed with any other code from the integration wizard... should this not "just work" ??
Or have I missed something else?
[Edit]
Update a few hours later...
I actually was able to get things to progress end to end. Once. But no record of the transaction can be seen on either side of the sandbox accounts. It did sit thinking for a long time... so I'm not sure what it was doing, but the final redirect was back with a success parameter, so I have to think that something behind the scenes must be having issues...
But now its not working anymore. Its stopping in the same spot again.
For the life of me, I don't believe I made any code changes to the PP wiz produced code prior to it working, or prior to it not working again.
I have logged into the sandbox to check the transaction as I mentioned. Both accounts are showing nothing. And the transactions are not processing.
[EDIT 2]
Ok - strange things are afoot. I know I did absolutely no changes since my last test...I havent even been at the keyboard. And upon trying again, the test proceeds to allow me to log into the sandbox, and approve a payment, but gets stuck processing at
https://www.sandbox.paypal.com/webapps/checkout/webflow/sparta/expresscheckoutvalidatedataflow?execution=e1s2
with the PayPal "Loading" icon spinning...
Is this a configuration issue on my side? With the Integration Wiz writing all the Express Checkout code, there's not to change, but it seems really flakey to me.
[EDIT3]
I've been hanging my head on this for about a day now, and got nowhere. My App is a single page Angular.js site, and triggers the PayPal purchase out of a Bootstrap Modal popup window.
As mentioned above, my process would get to the point of approving and confirming payment, then spin wildly at the point it should be redirecting back to the success (or failure) page.
Using the PP integration Wiz, the form code that was produced (and used) was:
<form name='ppcheckout' action='checkout.php' METHOD='POST'>
And it fails to proceed to the final redirect.
However, if I change the code to:
<form name='ppcheckout' action='checkout.php' METHOD='POST' target="_blank">
The processing occurs as expected.
Is there some interaction between PayPal's JS and Angular (or Bootstrap) that I'm not aware of? It seems strange that it "just works" when the target is added.

Unable to get a valid IPN postback with django-paypal

After spending several hours trying to get django-paypal (originally dcramer's fork) to get a 200 OK response from PayPal IPN, I pinpointed the error to PayPal adding an empty, spurious &cmd= argument when using the IPN Simulator. If I leave the &cmd= in, I get a 400 Bad Request response when I try to postback; if I take it out I get a 200 OK but, of course, the postback is invalid because it's not what PayPal sent my server.
Of course, I'd be absolutely happy to do away with the IPN Simulator entirely and simply use Sandbox accounts, but those are broken too: the ones I create through the developer interface can't login (login failed errors); the ones I created through the "regular" interface on the sandbox site don't send any IPN whatsoever no matter what.
So, actually there's two questions here:
is there a way to work around the IPN Simulator &cmd= bug?
is there a way to make the sandbox accounts work?
A reply to either one would make me very very happy.
Many of the issues you've experienced are now cleared up. The IPN issue and some developer/sandbox log in issues have been cleared up as of Monday evening. If you are still experiencing any issues please let me know and I'll be more than willing to look into this further.