improve error messages (particularly for checks)
[Business-OnlinePayment-LinkPoint.git] / LinkPoint.pm
index 1e5b1ab..84ea74e 100644 (file)
@@ -1,6 +1,6 @@
 package Business::OnlinePayment::LinkPoint;
 
-# $Id: LinkPoint.pm,v 1.26 2007-04-07 00:00:31 jeff Exp $
+# $Id: LinkPoint.pm,v 1.28 2007-05-01 21:37:17 jeff Exp $
 
 use strict;
 use vars qw($VERSION @ISA $DEBUG @EXPORT @EXPORT_OK);
@@ -13,8 +13,8 @@ require Exporter;
 @ISA = qw(Exporter AutoLoader Business::OnlinePayment);
 @EXPORT = qw();
 @EXPORT_OK = qw();
-$VERSION = '0.07';
-$DEBUG = 1;
+$VERSION = '0.08';
+$DEBUG = 0;
 
 use lpperl; #3;  #lpperl.pm from LinkPoint
 $LPPERL::VERSION =~ /^(\d+\.\d+)/
@@ -222,7 +222,9 @@ sub submit {
     } else {
       $self->is_success(0);
       $self->result_code('');
-      $self->error_message($response{'r_error'});
+      $response{'r_error'} =~/\S/
+        ? $self->error_message($response{'r_error'})
+        : $self->error_message($response{'r_approved'}); # no r_error for checks
     }
 
 }