diff options
author | fbriere <fbriere> | 2006-02-17 23:44:14 +0000 |
---|---|---|
committer | fbriere <fbriere> | 2006-02-17 23:44:14 +0000 |
commit | e7b48d8f859ab09851ef35ba4cd19d61fbe66f1f (patch) | |
tree | 28b0bb554726d7796a3c74e64ff66658c60612e0 /InternetSecure.pm | |
parent | e073ba9f3ec63298790683c9e0b8b20b8cd40417 (diff) |
Delete error_message() if transaction was successful
Diffstat (limited to 'InternetSecure.pm')
-rwxr-xr-x | InternetSecure.pm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/InternetSecure.pm b/InternetSecure.pm index e3a21e5..f2811ab 100755 --- a/InternetSecure.pm +++ b/InternetSecure.pm @@ -260,6 +260,9 @@ sub parse_response { # 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}); @@ -469,9 +472,9 @@ Response code returned by InternetSecure. =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() |