mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Put declined payment message as the exception message
This commit is contained in:
parent
adc00a7351
commit
947fda2473
2 changed files with 2 additions and 11 deletions
|
@ -74,10 +74,7 @@ trait ProcessPaymentTrait {
|
|||
$this->session_handler->destroy_session_data();
|
||||
} catch ( RuntimeException $error ) {
|
||||
$this->session_handler->destroy_session_data();
|
||||
wc_add_notice(
|
||||
__( 'Payment provider declined the payment, please use a different payment method.', 'woocommerce-paypal-payments' ),
|
||||
'error'
|
||||
);
|
||||
wc_add_notice( $error->getMessage(), 'error' );
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue