woocommerce-ceca-gateway
woocommerce-ceca-gateway copied to clipboard
Actualizar a sha256
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);
Gracias me ayudo para arreglar el error de "calcular firma"
perfecto Gracias Crack
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