# Completely undocumented field that sometimes override <Verbiage>
$self->error_message($response->{Error}) if $response->{Error};
+
+ # Delete error_message if transaction was successful
+ $self->error_message(undef) if $self->is_success;
$self->card_type(CARD_TYPES->{$self->card_type});
=item error_message()
-Text description of the response code. (Do not rely on this to check for
-errors, as a description will also be returned for successful transactions.
-Use B<is_success>() instead.)
+Error message if the transaction was unsuccessful; C<undef> otherwise. (You
+should not rely on this to test whether a transaction was successful; use
+B<is_success>() instead.)
=item receipt_number()
is_success => 1,
result_code => '2000',
authorization => 'T00000',
- error_message => 'Test Approved',
+ error_message => undef,
receipt_number => '1096019995.5012',
sales_number => 0,
date => '2003/12/17 09:59:58',