Gracias por su compra

get_api_key(); $signature_local = $api_key . ‘~’ . $merchantId . ‘~’ . $referenceCode . ‘~’ . $value . ‘~’ . $currency . ‘~’ . $transactionState; $signature_md5 = md5($signature_local); if(isset($_REQUEST[‘response_code_pol’])){ $polResponseCode = $_REQUEST[‘response_code_pol’]; } else { $polResponseCode = $_REQUEST[‘codigo_respuesta_pol’]; } if (strtoupper($signature) == strtoupper($signature_md5)) { $order = new WC_Order($referenceCode); if($transactionState == 6 && $polResponseCode == 5){ $order->update_status(‘failed’, __(‘Transaccion fallida’, ‘woothemes’)); } else if($transactionState == 6 && $polResponseCode == 4){ $order->update_status(‘refunded’, __(‘Transaccion rechazada’, ‘woothemes’)); } else if($transactionState == 12 && $polResponseCode == 9994){ $order->update_status(‘pending’, __(‘Transaccion pendiente’, ‘woothemes’)); } else if($transactionState == 4 && $polResponseCode == 1){ $order->payment_complete(); } else{ $order->update_status(‘failed’, __(‘Transaccion fallida’, ‘woothemes’)); } } ?>