1

I'm encountering a bit of trouble when moving my app (with makes use of Omnipay/PayPal) from the testserver to the productionserver.

PayPal-Payment works fine on the testserver. But I keep getting an "10002"-Error ("Authentication/Authorization Failed - You do not have permission to make this API call) on the productionserver. PayPal API-credentials are identical on both systems - so I guess there must be some differences between the two machines (on is a local MAMP-setup, the other a managed virtual server) causing this.

Have you encountered anything like this before?

Thanks in advance for you support

  • Oh, I forgot: I've tried the Omnipay-Example-Script on both servers with the same results. Working on my Testserver, Error-Message on the production-system. – user3241866 Jan 27 '14 at 19:42

1 Answers1

1

I was able to resolve this on my own. It seems that on some servers PHP's http_build_query (which is used by Omnipay/PayPal to build the query-string) uses "&amp" as the argument-seperator, so you have to set it to "&" manually in order to prevent authentication errors. See: http://www.php.net/manual/en/function.http-build-query.php#102324

  • Note for future readers: this has been fixed in Omnipay by your [pull request](https://github.com/omnipay/paypal/pull/2). Also, this will probably cause problems with more than just omnipay, so I would recommend adding the line `ini_set('arg_separator.output', '&');` to the start of your app. – Adrian Macneil Jan 28 '14 at 19:53