16 replies [Last post]
txcrew's picture
Offline
Joined: 09/28/2007
Juice: 103
Was this information Helpful?

Greetings community,

Every time someone places an order in my store I get tons of "Credit card encryption failed." messages in my watchdog.

But in my Ubercart status messages I show a green checkbox next to: Credit card encryption Credit card data in the database is currently being encrypted.

Are there other settings I should be looking out for other than the ones in the encryption instructions http://www.ubercart.org/docs/user/2731/credit_card_settings#security?

TIA,

txcrew

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: "Credit card encryption failed." Messages

What are the messages being appended to the watchdog message? and/or can you confirm that there is actually a .key file added to the folder you specified to contain the encryption key?

txcrew's picture
Offline
Joined: 09/28/2007
Juice: 103
Re: Re: "Credit card encryption failed." Messages

.key file is confirmed to be there.

Here is what it says in the watchdog:

Type uc_credit
Date Sunday, March 23, 2008 - 7:44pm
User Anonymous
Location http://example.com/order/cart/checkout/review
Referrer https://example.com/order/cart/checkout
Message Credit card encryption failed.

* No value has been supplied for decryption

Severity error
Hostname 65.89.141.30

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: "Credit card encryption failed." Messages

I dig.. that's silly. I wish it would just fail silently if no value was supplied. I'll look into tweaking the class. Thanks a lot for posting this up!

mccraic's picture
Offline
Joined: 11/05/2007
Juice: 61
"Credit card encryption failed." messages

Hello Ryan,

I am getting the same messages. I have just started testing this functionality today and have correctly set up the encryption of credit card data.

Thanks,

Patrick

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: "Credit card encryption failed." messages

Aye, it's non-critical and just a warning hiccup. I've committed a fix to core that will be in the next version, or you can get it from http://bazaar.ubercart.org.

jasonruyle's picture
Offline
Joined: 01/18/2008
Juice: 235
Re: Re: "Credit card encryption failed." messages

I'm getting this error message for the first time since I upgraded to RC2.

Type encryption
Date Tuesday, April 8, 2008 - 18:22
User Anonymous
Location h**p://www.watchmelearn.com/cart/checkout
Referrer h**p://www.watchmelearn.com/cart/checkout
Message Encryption failed.

    * No value has been supplied for encryption

Severity error

What does this error mean? I've placed our encryption location outside of root directory, the directory was populated with a key by ubercart.

Could this simply be from a persons card being declined?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: "Credit card encryption failed." messages

It just means it tried to encrypt an empty string... so either someone tried to submit checkout w/o supplying CC details, or the suppression on that message I tried to put in a while ago didn't quite work out. Eye-wink I can investigate it again when I'm back in the office.

tintin's picture
Offline
Joined: 04/28/2008
Juice: 24
Re: "Credit card encryption failed." Messages

I'm getting the same error message followed by another one "payment failed". I'm running an ubrcart version downloaded from http://bazaar.ubercart.org on 22.04.2008. Credit card payment cannot be completed.

This are my error messages:

Typ  encryption
Datum  Montag, 28. April 2008 - 15:11
Benutzer  riem
Ort  h**p://www.mk-office.ch/Webdesign/drupal/cart/checkout
Referrer  h**p://www.mk-office.ch/Webdesign/drupal/cart/checkout
Nachricht  Encryption failed.
    * No value has been supplied for encryption
Schweregrad  Fehler
Hostadresse  80.254.176.12

Typ  uc_payment
Datum  Montag, 28. April 2008 - 15:12
Benutzer  riem
Ort  h**p://www.mk-office.ch/Webdesign/drupal/cart/checkout/review
Referrer  h**p://www.mk-office.ch/Webdesign/drupal/cart/checkout/review
Nachricht  Payment failed: Payment failed.
    Error: This transaction cannot be processed due to an unsupported currency.
    Address: An unknown error occurred.
    CVV2: Not checked
Schweregrad  Warnung
Hostadresse  80.254.176.12

Thanks for helping,
Martin

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: "Credit card encryption failed." Messages

Hey Martin, the two problems seem to be unrelated. The encryption thing is a benign warning message that I thought I had filtered out. Your payment seems to have failed because it was an invalid currency. Are you by any chance trying to use something like a US PayPal account for Swiss sales?

(EDIT: Looks like I missed a couple of empty string warnings in the encryption class after all... committing fixes.)

tintin's picture
Offline
Joined: 04/28/2008
Juice: 24
Hi Ryan Thank your for your

Hi Ryan
Thank your for your quick answer. I have checked my ubrcart and PayPal account settings.

This is my ubercart setup:
PayPal Website Payments Standard settings
Currency code: CHF
PayPal Website Payments Pro settings
Currency code: CHF
Are there more currency relevant settings in ubercart?

The primary currency of my PayPal business account is Swiss Franc.

Is there a way to debug the communication with PayPal to get more detailed information about what's going wrong?
Regards Martin

tintin's picture
Offline
Joined: 04/28/2008
Juice: 24
Re: Hi Ryan Thank your for your

With the todays development snapshot downloaded from bazaar the problem is solved!!!
Thank's for your help!!!

tintin's picture
Offline
Joined: 04/28/2008
Juice: 24
Hi Ryan When I sent my last

Hi Ryan

When I sent my last post I thought credit card payment works but it still doesn't! I am running now Ubercart 5.x-1.0-rc4. And I get again the unsupported currency error message.

Typ  uc_payment
Datum  Montag, 19. Mai 2008 - 11:20
Benutzer  riem
Ort  h$$ps://www.ess.ch/taschentest/cart/checkout/review
Referrer  h$$ps://www.ess.ch/taschentest/cart/checkout/review
Nachricht  Payment failed: Payment failed.
    Error: This transaction cannot be processed due to an unsupported currency.
    Address: An unknown error occurred.
    CVV2: Not checked
Schweregrad  Warnung
Hostadresse  192.168.20.200

I double checked my PayPal and Ubercart currency settings and both are set to CHF!

Another thing I experienced is that the shop does not automatically switch to a secure connection (SSL, https) when I go to check out. In my opinion this should be a SSL connection because the customer enters his credit card number. By the way; the above https URL I entered manually.

Thanks for helping
Martin

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Hi Ryan When I sent my last

You'll need to use the Secure Pages module to convert the checkout page to SSL. As for the unsupported currency... I'd still double check with PayPal. I made it according to their specifications, but maybe there's something you need to do w/ your account before you can accept payments in CHF. Puzzled

tintin's picture
Offline
Joined: 04/28/2008
Juice: 24
Re: Re: Hi Ryan When I sent my last

I just downloaded PP_NVPAPI_DeveloperGuide.pdf from the PayPal web site.
Under TABLE A.2 DoDirectPayment Parameters I found:
CURRENCYCODE A three-character currency code. Default: USD.
This parameter accepts only the following currencies:
- AUD – Australian Dollar
- CAD – Canadian Dollar
- EUR – Euro
- GBP – Pound Sterling
- JPY – Japanese Yen
- USD – U.S. Dollar

So I guess this will never work for CHF.

Hava you any idea which other credit card payment gateway I could use for CHF transactions?

Kind regards Martin

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Hi Ryan When I sent my last

Bummer... I wasn't aware of the updates to their API... I'll check it out and update the PayPal module so we don't waste anyone else's time. Sad

I'm not sure what other payment services will work for you, sorry.

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Re: Re: Hi Ryan When I sent my last

That's kind of ridiculous on PayPal's part, but it sure looks like a limitation in their API. That setting will have fewer choices in it now. Sad