I have installed the Paypal Express payment module for OC 2.2.0.0. Everything goes fine with adding to the cart, getting to the final window from Paypal. When I submit the order, I get a "security header not valid" error. I have refreshed my modifications, double checked my API credentials (and pasted them directly from Paypal). Not running sandbox. Any ideas? I am running a custom theme so I don't want to upgrade to 3.x. This is the client's last step to opening her store, so I really would hate to have to start at square 1 again.
PayPal do make changes frequently to their APIs. If upgrading to a higher OC version is not an option for you, either download an extension from the Marketplace or create a new service request in the Commercial Support section of the forum to get this done as a custom job.I am running a custom theme so I don't want to upgrade to 3.x.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Check your API credentials again. It could be that the copy and paste added some spaces of other extra characters.
Do any of your PayPal API credentials contain the following?
Do any of your PayPal API credentials contain the following?
Code: Select all
& " < >
ADD Creative, thank you for responding. With respect to the special characters, the only ones I see in my credentials are hyphen (-) and underscore (_). None of the characters you noted. I have also confirmed that no spaces are present.
Last edited by webnurse on Wed Nov 14, 2018 4:09 am, edited 1 time in total.
PayPal Express is working fine on a store using version 2.3.0.2, which in not that different to 2.2.0.0. If there had been an change in PayPal's API there would be loads of people posting about their problems. So it's still most likely that there is a problem with your API credentials.
What has worked for some people is to do the following.
1. Uninstall the PayPal Express Checkout extension in OpenCart
2. Regenerate the API credentials in PayPal
3. Reinstall the PayPal Express Checkout extension in OpenCart
4. Enter the new credentials
5. Make sure Test (Sandbox) Mode is set to No in the settings
6. Save settings
What has worked for some people is to do the following.
1. Uninstall the PayPal Express Checkout extension in OpenCart
2. Regenerate the API credentials in PayPal
3. Reinstall the PayPal Express Checkout extension in OpenCart
4. Enter the new credentials
5. Make sure Test (Sandbox) Mode is set to No in the settings
6. Save settings
This topic may be useful to fix the URL encoding, however: https://github.com/opencart/opencart/issues/6602 .
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
May not be any help to you, but I use the following code in a .php file to test API credentials. Just replace the username, password and signature.
If you see "L_LONGMESSAGE0=Order total is missing." in the result then your API credentials are working.
If you see "L_LONGMESSAGE0=Security header is not valid" in the result then there is a problem with them or your connection to PayPal.
If you see "L_LONGMESSAGE0=Order total is missing." in the result then your API credentials are working.
If you see "L_LONGMESSAGE0=Security header is not valid" in the result then there is a problem with them or your connection to PayPal.
Code: Select all
<?php
// $url = 'https://api-3t.sandbox.paypal.com/nvp';
$url = 'https://api-3t.paypal.com/nvp';
$data = array(
'USER' => 'username',
'PWD' => 'password',
'SIGNATURE' => 'signature',
'VERSION' => '109.0',
'METHOD' => 'SetExpressCheckout'
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
echo urldecode(curl_exec($ch));
curl_close($ch);
?>
Who is online
Users browsing this forum: No registered users and 29 guests