Sermepa/Redsys is upgrading to use of SHA256, so current module will stop working on 23th November of 2015.

I know that Drupal 6 is reaching End of Life but there are still projects using it.

I'm already working on it but I'm waiting for Redsys to give me a test user account.

More info about this migration: https://canales.redsys.es/canales/ayuda/migracionSHA256.html
And a RedsysAPI: http://www.redsys.es/wps/wcm/connect/redsys/45b1e5d9-689f-4df0-b2e5-7bff...

Comments

turtulino created an issue. See original summary.

  • turtulino committed 4ea3970 on 6.x-3.x
    #2599558 New 6.x-3.x version supporting SHA256
    
turtulino’s picture

Version: 6.x-2.x-dev » 6.x-3.x-dev

Created new release to include the necessary changes.

ferrangil’s picture

We will need this very much too. Can't really help in the development, but can try testing it live.
@turtulino keep us posted of the progress, please.
Thanks

turtulino’s picture

I am currently waiting for my bank to provide me proper user credentials for testing.

I appreciate any help with testing. Steps:

  • You need a pre production site environment. This must be online (accessible from internet)
  • Install version 3.x-dev
  • Do your tests
  • Give me feedback, patches or information on the bank if the module works

Thanks

ferrangil’s picture

I've already have a copy of the live site, with the 3.x-dev version.
I am going to ask for testing credentials now, as well as a new Ds_MerchantSignature.
I will test with Catalunya Banc and report back.

I cannot enable the new payment method on /admin/store/settings/payment/edit/methods. I click the enabled checkbox, click the "Save configuration" button and the page refreshes but the checkbox is still disabled. No warnings or errors on the screen, the drupal log or apache. Mmm...

turtulino’s picture

Hi ferrangil.

As far as i've tested, new banks new banks should appear as activated when they are created.

Anyway, /admin/store/settings/payment/edit/methods it is not a page managed by uc_sermepa and I can not imagine what may be causing the problem.

Since the parameter is a regular configuration variable, it may be possible to adjust it via Drush:

drush vset uc_payment_method_YOUR_BANK_CODE_checkout 1

...or directly changing the value in the database.

I'm sorry, but I'm not able to reproduce the error.

carlos.burgueño’s picture

Testing with Santander TPV... It seems that the order data is not sent successfully, because redsys return "Error en datos enviados. Contacte con su comercio." message. The data show are:

  • Importe 0 Sin Asignar
  • Terminal 1
  • Número pedido

It's tested with a test SHA-256 key for my commerce.

turtulino’s picture

Hi Carlos.

Please check out the code of the web that shows you the error. Search the text "sis0". The number displayed is the error code that is occurring. What is that code?

Today, I have been testing in the Redsys test environment. The results were similar to yours. However, in the production environment, the module has worked well.

Would it be possible to test against Redsys production environment?

carlos.burgueño’s picture

The error code is "SIS0435" : "Error en el cálculo de la firma" in test environment. I have tested against Redsys production environment and It seems to work ok, but I have not yet completed the payment with the card

ferrangil’s picture

Thanks turtulino.
I did also tried to change the value to 1 into the database variable table , but same result. In the bank configuration, the checkbox "Enabled" is enabled.
I had to enable the "credit card" module (from ubercart) and create a directory like /var/www/keys so a key could be created there. I was using an old version of ubercart and didn't have that directory. I guess with the new version that's kind of required. I think it's the Credit Card with Paypal that required that.
I'll try to find a solution and explain it just in case it happens to somebody else.

turtulino’s picture

Hi ferrangil

If your card payments are managed by Redsys you can safely disable uc_credit module. uc_sermepa does not depend on uc_credit.

I think you could have a problem not related with SHA256. Maybe you should open a new issue to address this problem.

ferrangil’s picture

Yes, I won't hijack this issue any longer. The Credit card that appeared now is the one by default in ubercart.
I think the issue I had was that the bank machine name had an space! The variable in the variable table had the space too... Maybe the description Codename for the bank, must be unique should include "Do not use spaces"? Not sure if it's the issue but anyway the variable name with spaces it's probably not recommended..
I'll report back as soon as I'm able to test uc_sermepa with SHA256.

ferrangil’s picture

Hola!
OK, it worked in test mode, with Catalunya Bank, using the credit card their gave me to test.
However, there's a php error on the drupal log, generated at
http://xxx256.xxxx.com/uc_sermepa/post
and the message is
Missing argument 1 for uc_sermepa_post() in /var/www/xxxx256/sites/all/modules/uc_sermepa/uc_sermepa.module on line 333
This appears first, then the Order 26xxx response received and Order 26202 accepted.

turtulino’s picture

Hi ferrangil

Missing argument warning has been removed in the latest commit. You can download the latest version and try again if you want to be sure.

ferrangil’s picture

Great, turtulino, thanks. I see it's fixed.
Another minor thing: In uc_sermepa_menu there's an entry for
admin/store/settings/payment/edit/uc_semepa
You may want to change it to
admin/store/settings/payment/edit/uc_sermepa
I'll test it live tomorrow, just asked for the live key.

ferrangil’s picture

Hello again.
I have it on a live site, working just fine.
A small bug: If you try to create a bank directly selecting "Live", the page saves and the bank is not added. No error messages anywhere. If you add the bank selecting "Test", then all works fine. Once saved, I edited it to change to Live and it worked fine.

Also, not a bug but something necessary, the language is set to 1 (spanish). I've used a simple function that Pedro Cambra created on the uc_caixa_catalunya module to get the language in use on the browser. Less important than before, as the TPV page has now a select with the languages. A few years ago I think that language switch wasn't there.

As all these small issues are related with this 3.x release, I thought it was better to add them here instead of creating new issues for each small thing.
Thanks you all your work on this module.

cmfdevel’s picture

Testing with Sabadell TPV.

I get this message when I send payment: "Error en datos enviados. Contacte con su comercio."

The data show are:
Importe 0 Sin Asignar
Terminal 1
Número pedido

The hidden code of error is SIS0042:
<!--SIS0042:-->Error en datos enviados. Contacte con su comercio.

Test for SHA-256 in test mode.

turtulino’s picture

Title: Support for SHA256 (D6) » Support for SHA256 (Drupal 6)

Hi cmfdevel.

See comments #8 - #10

Have you tested it in production environment? Currently several people have reported that the module works with Sabadell only in production environment.

turtulino’s picture

Status: Active » Needs review

Hi ferrangil

For problems other than SHA256 is better to open new issues.

turtulino’s picture

Currently some users have reported that the module works correctly with:

  • BBVA
  • Sabadell (only in production environment)
  • Santander (only in production environment)
  • Catalunya Bank (tested only in test environment)
ferrangil’s picture

Catalunya Bank works in production. I've a site getting orders just fine since last week.

cmfdevel’s picture

Hi again turtulino

Finally with the correct HASH SHA-256 (for test environment), the module works fine for Sabadell in test mode. I had an incorrect hash.

Thank you

polmaresma’s picture

Tested and working with La Caixa, I also needed to set variable with drush as in #7.
Thank's for all!

mjimcua’s picture

Tested and working with Banco Popular

turtulino’s picture

Status: Needs review » Reviewed & tested by the community

Currently some users have reported that the module works correctly with:

  • BBVA
  • Sabadell
  • Santander
  • Catalunya Bank
  • La Caixa
  • Banco Popular

Thank you all for your feedback.

turtulino’s picture

Status: Reviewed & tested by the community » Fixed

I think that support for SHA256 is working.

Please use this issue to report currently funcional banks. For other problems, please open new issues.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.