PayPal "security header not valid" with correct API access

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
pixls
Posts: 26
Joined: 21 Nov 2016, 10:46

PayPal "security header not valid" with correct API access

Post by pixls » 17 Jan 2018, 15:53

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

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

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

Post by aimeos » 18 Jan 2018, 08:59

Do you also use the Sandbox URL? Seems like you are trying to authenticate with the developer account at the PayPal production endpoint.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

pixls
Posts: 26
Joined: 21 Nov 2016, 10:46

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

Post by pixls » 18 Jan 2018, 15:18

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.

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

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

Post by aimeos » 18 Jan 2018, 18:16

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
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

pixls
Posts: 26
Joined: 21 Nov 2016, 10:46

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

Post by pixls » 19 Jan 2018, 12:36

Thank you very much. It's working now.

Post Reply