Is there a hook in woocommerce for when a payment fails to display a custom error message?

wc_add_notice works during process_payment(). Notices will be collected and displayed for you after loading.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)