juanmirod / woocommerce-ceca-gateway

CECA gateway for Woocomerce Wordpress plugin
GNU General Public License v3.0
22 stars 21 forks source link

Actualizar a sha256 #11

Open luiscmas opened 7 years ago

luiscmas commented 7 years ago

El código actual no está preparado para SHA256, habría que cambiar estas líneas de código:

$result['Cifrado'] = 'SHA1'; por $result['Cifrado'] = 'SHA2';

$signature_str = $this->password .$this->merchand_id .$this->acquirer_bin .$this->terminal_id .$order->id .$order->get_total()*100 .$this->currency .'2SHA2' .$this->get_return_url( $order ) .get_permalink( woocommerce_get_page_id( 'checkout' ) ); return sha1($signature_str); return hash('sha256', $signature_str);

por $signature_str = $this->password .$this->merchand_id .$this->acquirer_bin .$this->terminal_id .$order->id .$order->get_total()*100 .$this->currency .'2SHA2' .$this->get_return_url( $order ) .get_permalink( woocommerce_get_page_id( 'checkout' ) ); return hash('sha256', $signature_str);

sergionwc10 commented 5 years ago

Gracias me ayudo para arreglar el error de "calcular firma"

Ruisda commented 5 years ago

perfecto Gracias Crack

DickeyFuller commented 5 years ago

Deberíais migrar al módulo oficial de CECABANK que da soporte a SHA256. Os dejo el enlace al modulo: https://github.com/cecabank/cecabank-woocommerce