Page 1 of 1

PayPal "security header not valid" with correct API access

Posted: 17 Jan 2018, 15:53
by pixls
Hi

To test the PayPal Payment i created a sandbox account at https://developer.paypal.com
In aimeos i set the required configuration values "paypalexpress.AccountEmail ", "paypalexpress.ApiUsername",
"paypalexpress.ApiPassword" and "paypalexpress.ApiSignature" based on the credentials i got from the sandbox account. I've double checked and these values are correct, I copied them straight from the sandbox site.

However i get the following error when trying to pay with PayPal:
Request for order ID failed with "Security error"

In the aimeos log i can see that there is a "Security header is not valid" error which would be typical for wrong API credentials. However that can not be that case, I'm certain.

The full error is:
PayPal Express: method = Aimeos\MShop\Service\Provider\Payment\PayPalExpress::process, order ID = 79, response = Array ( [TIMESTAMP] => 2018-01-17T15:38:58Z [CORRELATIONID] => ba9dd6f45d09e [ACK] => Failure [VERSION] => 204.0 [BUILD] => 000000 [L_ERRORCODE0] => 10002 [L_SHORTMESSAGE0] => Security error [L_LONGMESSAGE0] => Security header is not valid [L_SEVERITYCODE0] => Error )

What's wrong here? Thanks for any help.

Using:
TYPO3 8.7.7
aimeos: 17.10.0

Re: PayPal "security header not valid" with correct API acce

Posted: 18 Jan 2018, 08:59
by aimeos
Do you also use the Sandbox URL? Seems like you are trying to authenticate with the developer account at the PayPal production endpoint.

Re: PayPal "security header not valid" with correct API acce

Posted: 18 Jan 2018, 15:18
by pixls
No I am not using that. What would this configuration field in aimeos be called? And what do I have to set it to?
I don't even know which API you are using and where i can find documentation.

Re: PayPal "security header not valid" with correct API acce

Posted: 18 Jan 2018, 18:16
by aimeos
The PayPalExpress provider still uses the old PayPal NVP API. In the demo dataset, you find the sandbox URL too:

paypalexpress.ApiEndpoint : https://api-3t.sandbox.paypal.com/nvp
paypalexpress.PaypalUrl : https://www.sandbox.paypal.com/webscr&c ... token=%1$s

Re: PayPal "security header not valid" with correct API acce

Posted: 19 Jan 2018, 12:36
by pixls
Thank you very much. It's working now.