failure status
[Business-BatchPayment.git] / BatchPayment / Item.pm
index 8a203ac..996c646 100644 (file)
@@ -310,6 +310,28 @@ account again.
 The message returned by the gateway.  This may contain a value even 
 if the payment was successful (use C<approved> to determine that.)
 
+=item failure_status
+
+A normalized failure status, from the following list:
+
+=over 4
+
+=item expired
+
+=item nsf (non-sufficient funds / credit limit)
+
+=item stolen
+
+=item pickup
+
+=item blacklisted
+
+=item inactive
+
+=item decline (other card/transaction declines)
+
+=back
+
 =back
 
 =cut
@@ -325,6 +347,17 @@ has [qw(
   assigned_token
 )] => ( is => 'rw', isa => 'Str');
 
+enum FailureStatus => qw(
+  expired
+  nsf
+  stolen
+  pickup
+  blacklisted
+  inactive
+  decline
+);
+has failure_status  => ( is => 'rw', isa => 'Maybe[FailureStatus]' );
+
 has check_number => ( is => 'rw', isa => 'Int' );
 
 around 'BUILDARGS' => sub {