Jump to content

v1.7.1 Paypal. An error occurred. Please check your credentials.


6023500

Recommended Posts

  • 2 weeks later...
Does not work. Minimum one error line: 
  • An error occurred. Please, check your credentials.

 

I checked several times, created new ones. Does not help.

 

Actions:

0. Visit this link (Paypal): https://developer.paypal.com/developer/applications/

1. Click "Create App". Create app with a name "Example" (REST API apps). 
2. Click on new App "Example". 
3. Found "Client ID" at "SANDBOX API CREDENTIALS".
4. Copy->paste this code to "Sandbox" - "Client ID" field in PayPal Plugin (Prestashop). No spaces, checked in Notepad!
5. Back to Paypal. Click "Show" link, found "Secret". Copy 2 lines (?) like 1 with code (one line now). 
6. Copy-paste "Sandbox" -> "Secret" in Paypal plugin (Prestashop). No spaces, checked in Notepad!
7. Back to Paypal. Click "LIVE" switcher.
 
Repeat copy/paste 3-6 steps from "LIVE API CREDENTIAL" to Section "Live" in Paypal plugin (Prestashop).

 

What wrong?

Edited by den99 (see edit history)
Link to comment
Share on other sites

This is a bug. I made a patch. Working good for me now.

Working on PHP 7.0.17 and below (does not work with version 7.1) PHP-FPM with Opcache (nginx or Apache).

Prestashop 1.7.1.1, multilanguage/multicurrency. 

If you need it, I can sell it by a little price.

Edited by den99 (see edit history)
Link to comment
Share on other sites

Minimun price in prestashop marketplace is 19.99 euros. But this is only patch and my price is 5$ (I'm selling my time). 

If you want save your time and fix this bug (may be you need more consultations), contact me by PM, please. Click on my nickname.

 

If you scare about 5$, you can report me here (I have connected few shops here) and on Paypal (I have business Paypal account and my contacts is open for buyers).

 

If you can wait an Official Updates - ok, not a problem.

 

Thanx.

Edited by den99 (see edit history)
Link to comment
Share on other sites

en español, yo tuve el mismo problema, el error  esta en que las api que copiamos no son las correctas, las api de sandbox no son las que deben escoger sino las live, en la pagina de paypal, cuando generen las api en paypal no usen esos id, me refiero a los de sandbox, debes usar los de live, ya las configure e hice una prueba de una compra y todo funciona al 100%

 

1. generar api sandbox en https://developer.paypal.com/developer/applications/

2. client id y secret generados de live usar esos.

3. ok deberia funcionar

 

in english,I had the same problem, the error is that the api we copied are not correct, the sandbox api are not the ones to choose but live, in the paypal page, when they generate the api in paypal no Use those id, I mean the sandbox, you must use the live, configure them and did a test of a purchase and everything works at 100%

1. generate api sandbox at https://developer.paypal.com/developer/applications/

2. client id and secret generated use api live, no sandbox.

3. ok work

Link to comment
Share on other sites

en español, yo tuve el mismo problema, el error  esta en que las api que copiamos no son las correctas, las api de sandbox no son las que deben escoger sino las live, en la pagina de paypal, cuando generen las api en paypal no usen esos id, me refiero a los de sandbox, debes usar los de live, ya las configure e hice una prueba de una compra y todo funciona al 100%

 

1. generar api sandbox en https://developer.paypal.com/developer/applications/

2. client id y secret generados de live usar esos.

3. ok deberia funcionar

 

in english,I had the same problem, the error is that the api we copied are not correct, the sandbox api are not the ones to choose but live, in the paypal page, when they generate the api in paypal no Use those id, I mean the sandbox, you must use the live, configure them and did a test of a purchase and everything works at 100%

 

1. generate api sandbox at https://developer.paypal.com/developer/applications/

 

2. client id and secret generated use api live, no sandbox.

3. ok work

 

Hi,

The paypal module requires both Sandbox and Live credentials, so you leave the Sandbox fields empty? Or do you enter the same credentials as Live in the Sandbox?
Anyway I've tried in all 2 ways and it does not work unfortunately.
Can you explain me how to make it work?
thank you
Link to comment
Share on other sites

 

Hi,

The paypal module requires both Sandbox and Live credentials, so you leave the Sandbox fields empty? Or do you enter the same credentials as Live in the Sandbox?
Anyway I've tried in all 2 ways and it does not work unfortunately.
Can you explain me how to make it work?
thank you

 

Yes use credentials live en prestashop sandbox and live,

I leave the steps as I did

1.create api paypal, copy api live no sandbox.

2. copy paste api live paypal in module paypal prestashop in sandbox and live

3.use sandox or live in configuration in module paypal prestashop.

4. ready work

 

I leave you a pdf file of how it looks with images and steps but it is in Spanish, comment as it was

 

CONFIGURAR PAYPAL PRESTASHOP 1.7.pdf

Link to comment
Share on other sites

Yes use credentials live en prestashop sandbox and live,

I leave the steps as I did

1.create api paypal, copy api live no sandbox.

2. copy paste api live paypal in module paypal prestashop in sandbox and live

3.use sandox or live in configuration in module paypal prestashop.

4. ready work

 

I leave you a pdf file of how it looks with images and steps but it is in Spanish, comment as it was

 

attachicon.gifCONFIGURAR PAYPAL PRESTASHOP 1.7.pdf

Thanks, but unfortunately it does not work

Link to comment
Share on other sites

Hello everyone,

We suggest you contact 202ecommerce, our partner agency which made the PayPal module. 

 

Thank you! :)

 

Hello everyone,

We suggest you contact 202ecommerce, our partner agency which made the PayPal module. 

 

Thank you! :)

is it possible to us the moudle in PS 1.6? THE CURRENT PAYPAL MOUDLE IN 1.7 IS A piece of shit, does not works

Link to comment
Share on other sites

Yes use credentials live en prestashop sandbox and live,

I leave the steps as I did

1.create api paypal, copy api live no sandbox.

2. copy paste api live paypal in module paypal prestashop in sandbox and live

3.use sandox or live in configuration in module paypal prestashop.

4. ready work

 

I leave you a pdf file of how it looks with images and steps but it is in Spanish, comment as it was

 

attachicon.gifCONFIGURAR PAYPAL PRESTASHOP 1.7.pdf

why the Client ID:  so  short in your PDF? Mine is very lone, 30characters  almost

Link to comment
Share on other sites

I have already wast too  much time on set up the Paypal iN 1.7 why  it is so complicated to set up, the Paypal module in 1.6 is much easier to set up

  I came to exactly the same conclusion last night! Already installed the latest 1.6 version of Prestashop (1.6.1.13), and everything is working fine. This is the best decision to make.

Link to comment
Share on other sites

  • 4 weeks later...

Looks like it's due to Paypal requiring TLS 1.2 and your openssl/php/curl might not support it.

 

You need:

openssl v1.0.1+

php v5.5.19+

curl v7.34+

 

If all versions are OK then try adding this to the file: modules/paypal/sdk/PaypalSDK.php to the method makeCall()

curl_setopt ($curl, CURLOPT_SSLVERSION, 6);

Edited by quochuy (see edit history)
Link to comment
Share on other sites

Sorry, but i have the same error:

  • An error occurred. Please, check your credentials.
  • An error occurred. Please, check your credentials.

Some body got resolved this issue?

 

No puedo activar mi tienda por supuesto error de credenciales.

 

Ya cambié la configuración como el PDF que anexaron.

Ya apliqué las credenciales del ID y en los dos campos y nada.

Link to comment
Share on other sites

I got it fixed by updating opeenssl, curl and PHP as explained above.

I now don't get the error messages and get this confirmation that Paypal is now OK

Your PayPal account is currently configured to accept payments on the Sandbox (test environment). Any transaction will be fictitious. Disable the option to accept actual payments (production environment) and log in with your PayPal credentials
Edited by quochuy (see edit history)
Link to comment
Share on other sites

Ubuntu 14.04

PHP 5.5.9

curl 7.35.0

libcurl 7.35.0

OpenSSL/1.0.1f

 

Your versions seem OK, so maybe try adding this line:

curl_setopt ($curl, CURLOPT_SSLVERSION, 6);

To this file:

modules/paypal/sdk/PaypalSDK.php to the method makeCall()

Just before the line that contains curl_exec(....)

 

This will force PHP Curl to use TLS v1.2

 

Also few lines under curl_exec(...) you will see a commented out line, uncomment that line, next time you update your paypal settings it should show you what was the error curl has encountered.

Edited by quochuy (see edit history)
Link to comment
Share on other sites

You can check our PayPal module - it's super easy to set up, all you need is your PayPal email.

 

www.presta-theme-maker.com/ptm-paypal-module/

 

www.presta-theme-maker.com/plans-signup/ (below the official plans, costs 9 EUR)

Paypal is enforcing TLS v1.2 on their sandbox API, so I believe your PayPal module would be affected too if the user decided to enable Paypal Sandbox on a server with older version of the libraries (OpenSSL, curl and PHP) that don't support TLS v1.2

Edited by quochuy (see edit history)
Link to comment
Share on other sites

Hi.

 

Eureka... Bingo, Yata!

 

I got download the module paypal version 1.5 and upload to 1.7.

 

With this module bersion paypal tp presthashop 1.7 letme configuration.

 

Only i have some error: When i trayed to pay get the error: "Desafortunadamente, no hay métodos de pago disponibles.

  •  

"

Link to comment
Share on other sites

Hi.

 

Eureka... Bingo, Yata!

 

I got download the module paypal version 1.5 and upload to 1.7.

 

With this module bersion paypal tp presthashop 1.7 letme configuration.

 

Only i have some error: When i trayed to pay get the error: "Desafortunadamente, no hay métodos de pago disponibles.

  •  

"

 

Go in Payment > Preferences and make sure you have selected Paypal where you need it.

Link to comment
Share on other sites

Yet another bug with this module.

Now that it seems to be working, I made a test payment and at step 4 from the cart checkout, when select Paypal as method then proceed with the payment, the button takes me to /module/paypal/ecInit?credit_card=0 and then goes back to the checkout page.

 

With some debug output I saw that the module was passing NULL as currency to Paypal API which does not like it.

 

The reason for that NULL value is modules/paypal/classes/MethodEC.php in the init() method, near the top:

$currency = $module->getCurrency($context->cart->id_currency);

Which is then used lower:

$items[] = array(
    'quantity' => 1,
    'name' => $paypal->l('Discount : ').$discount['name'],
    'price' =>  $price_discount,
    'currency' => $currency->iso_code,
    'description' => strip_tags($discount['description']),
    'tax' => $tax_discount,
);

The problem is getCurrency() is coming from /classes/PaymentModule.php

And that method is returning an array of more than one currency (at least in my case because my shop uses two currencies).

However, the code above is expecting a single currency and thus $currency->iso_code returns null.

 

The name of the function is getCurrency, so one expects this to return a single currency not multiple...

Because I don't know the impact of changing that, I made a fix in MethodEC.php instead.

 

So I just replaced:

$currency = $module->getCurrency($context->cart->id_currency);

With this:

$currencies = $module->getCurrency($context->cart->id_currency);
foreach ($currencies as $availableCurrency) {
    if ((int)$context->cart->id_currency === (int) $availableCurrency['id_currency']) {
        $availableCurrency['id'] = $availableCurrency['id_currency'];
        $currency = (object) $availableCurrency;
        break;
    }
}

Then do the same in the validation() method, replace:

$currencies = $paypal->getCurrency($context->currency->id);

with this:

$currencies = $paypal->getCurrency($context->currency->id);
foreach ($currencies as $availableCurrency) {
    if ((int)$context->cart->id_currency === (int) $availableCurrency['id_currency']) {
        $availableCurrency['id'] = $availableCurrency['id_currency'];
        $currency = (object) $availableCurrency;
        break;
    }
}
Edited by quochuy (see edit history)
Link to comment
Share on other sites

I changed the code, but i got the same error:

 

  • An error occurred. Please, check your credentials.
  • An error occurred. Please, check your credentials.

ADDED THE CODE, BUT DON´T WORKING FINE YET:

 

1:

public function init($data)
    {
........
   //$currency = $module->getCurrency($context->cart->id_currency); //comentado w3mx
$currencies = $module->getCurrency($context->cart->id_currency);
foreach ($currencies as $availableCurrency) {
    if ((int)$context->cart->id_currency === (int) $availableCurrency['id_currency']) {
        $currency = (object) $availableCurrency;
        break;
    }
}
...}

 

2:

public function validation()

...

        //$currency = $paypal->getCurrency($context->currency->id);
$currencies = $paypal->getCurrency($context->currency->id);
foreach ($currencies as $availableCurrency) {
    if ((int)$context->cart->id_currency === (int) $availableCurrency['id_currency']) {
        $availableCurrency['id'] = $availableCurrency['id_currency'];
        $currency = (object) $availableCurrency;
        break;
    }
}

....}

Link to comment
Share on other sites

Sorry, maybe a cokies navigator.

 

Now the conections is Ok.

 

This es the beutifull message that i was waittin: "Your PayPal account is properly connected, you can now receive payments".

 

I hope that this histoy post help to conect correctly paypal in Prestshop 1.7.2

 

Tks by the support and all comiunity about this mistake.

 

Now i can sell correctly!

Link to comment
Share on other sites

I belibedthat my site could selling without problem, but i have the last problem.

 

When i selected in step 4:

 

Pay with Paypal | It's easy, simple and secure 

 

OR

 

Pay with debit or credit card

 

Never send me to paypal. My site reload in the same step.

 

Some body now if this issue is by configuration prestashop?

 

This is my site:

http://leotardosdegimnasia.com/tienda/mx/

Link to comment
Share on other sites

I belibedthat my site could selling without problem, but i have the last problem.

 

When i selected in step 4:

 

Pay with Paypal | It's easy, simple and secure 

 

OR

 

Pay with debit or credit card

 

Never send me to paypal. My site reload in the same step.

 

Some body now if this issue is by configuration prestashop?

 

This is my site:

http://leotardosdegimnasia.com/tienda/mx/

revisa esto, see you

 

https://www.prestashop.com/forums/topic/603284-configuracion-paypal-prestashop-17/page-3

Link to comment
Share on other sites

  • 1 month later...

I have the same error.

 

Cant connect paypal account.

 

This module are broken.

 

Why launch a new Prestashop version, if we cant receive the payments, by the most used payment module???? So no sense !!!!!

 

Maybe the developers need be more profissional and act with responsability.

 

Too bad for prestashop brand this problem occur without fix, for so long time.

Link to comment
Share on other sites

  • 9 months later...
  • 4 weeks later...
  • 1 month later...

Ciao guys,

regarding this error "There was an error, check your paypal credentials", you must enter the paypal merchant area.

In the account setup, find "Manage API Certificate". Entering that area you will see your API credentials. If there are Active API Certificates below, remove them (see attached image).

Once this is done, the system will no longer conflict.

Ciao
Nico

API-PayPal.png

Link to comment
Share on other sites

1 hour ago, Nico said:

Ciao guys,

regarding this error "There was an error, check your paypal credentials", you must enter the paypal merchant area.

In the account setup, find "Manage API Certificate". Entering that area you will see your API credentials. If there are Active API Certificates below, remove them (see attached image).

Once this is done, the system will no longer conflict.

Ciao
Nico

API-PayPal.png

I tried this yet the same error is coming...

Link to comment
Share on other sites

4 minuti fa, radhavallabh dice:

I tried this yet the same error is coming...

 

Reset the paypal module, then update it to the latest version v4.4.1.
Once this is done, configure the form again to the merchant.

Link to comment
Share on other sites

  • 1 month later...
On 7/5/2018 at 4:45 AM, Nico said:

Ciao guys,

regarding this error "There was an error, check your paypal credentials", you must enter the paypal merchant area.

In the account setup, find "Manage API Certificate". Entering that area you will see your API credentials. If there are Active API Certificates below, remove them (see attached image).

Once this is done, the system will no longer conflict.

Ciao
Nico

API-PayPal.png

This perfectly fixes the problem. You are my hero.

Link to comment
Share on other sites

  • 1 year later...
  • 2 months later...


Most frustrated I have ever been trying to setup a paypal account.  I mean really?????

I gave up and just read through the code, found if you run the queries directly in the db it works fine.

For sandbox:
 

UPDATE p_configuration SET value="***api password***" WHERE name="PAYPAL_PSWD_SANDBOX";
UPDATE p_configuration SET value="***api signature***" WHERE name="PAYPAL_SIGNATURE_SANDBOX";
UPDATE p_configuration SET value="***api username***" WHERE name="PAYPAL_USERNAME_SANDBOX";
UPDATE p_configuration SET value="***merchant id***" WHERE name="PAYPAL_MERCHANT_ID_SANDBOX";
UPDATE p_configuration SET value="1" WHERE name="PAYPAL_CONNECTION_EC_CONFIGURED";


For live:
 

UPDATE p_configuration SET value="***api password***" WHERE name="PAYPAL_PSWD_LIVE";
UPDATE p_configuration SET value="***api signature***" WHERE name="PAYPAL_SIGNATURE_LIVE";
UPDATE p_configuration SET value="***api username***" WHERE name="PAYPAL_USERNAME_LIVE";
UPDATE p_configuration SET value="***merchant id***" WHERE name="PAYPAL_MERCHANT_ID_LIVE";
UPDATE p_configuration SET value="1" WHERE name="PAYPAL_CONNECTION_EC_CONFIGURED";


Merchant ID can be found in paypal > profile > business info.
Updating PAYPAL_CONNECTION_EC_CONFIGURED to 1 is required, this is how it flags it connected.

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...