diff --git a/src/Gateways/AbstractGateway.php b/src/Gateways/AbstractGateway.php index 831d531..3829d9c 100644 --- a/src/Gateways/AbstractGateway.php +++ b/src/Gateways/AbstractGateway.php @@ -697,7 +697,7 @@ public function process_refund( $order_id, $amount = null, $reason = '' ) { $request = $this->prepare_request( $txn_type, $order ); $request_args = $request->get_args(); if ( empty( $request_args[ RequestArg::AMOUNT ] ) ) { - throw new Exception( __( 'Refund amount must be greater than zero.' ) ); + throw new Exception( __( 'Refund amount must be greater than zero.', 'globalpayments-gateway-provider-for-woocommerce' ) ); } $response = $this->submit_request( $request ); $is_successful = $this->handle_response( $request, $response ); diff --git a/src/Gateways/Handlers/PaymentTokenHandler.php b/src/Gateways/Handlers/PaymentTokenHandler.php index 827c6d4..8529a26 100644 --- a/src/Gateways/Handlers/PaymentTokenHandler.php +++ b/src/Gateways/Handlers/PaymentTokenHandler.php @@ -6,8 +6,8 @@ class PaymentTokenHandler extends AbstractHandler { public function handle() { - if ( ! $this->response->token ) { - return; + if ( empty( $this->response->token ) ) { + return; } ( new PaymentTokenData( $this->request ) )->save_new_token( $this->response->token, $this->response->cardBrandTransactionId );