Add B::OP undocumented _info discovery hash
[Business-OnlinePayment-Bambora.git] / lib / Business / OnlinePayment / Bambora.pm
index 21039f1..98c402f 100755 (executable)
@@ -17,14 +17,31 @@ use URI::Escape;
 
 use vars qw/ $VERSION $DEBUG /;
 $VERSION = '0.1';
-$DEBUG   = 1;
-
-if ( $DEBUG ) {
-    $Data::Dumper::Sortkeys = 1;
-}
+$DEBUG   = 0;
 
 =head1 INTERNAL METHODS
 
+=head2 _info
+
+=cut
+
+sub _info {{
+  info_compat       => '0.01',
+  module_version    => $VERSION,
+  supported_types   => [qw/ CC /],
+  supported_actions => {
+    CC => [
+      'Normal Authorization',
+      'Authorization Only',
+      'Post Authorization',
+      'Void',
+      'Credit',
+      'Reverse Authorization',
+      'Tokenize',
+    ],
+  },
+}}
+
 =head2 set_defaults
 
 See L<Business::OnlinePayment/set_defaults>
@@ -552,7 +569,6 @@ sub jhref_card {
     owner
     expiry_month
     expiry_year
-    cvv2
   /) {
     next if $content->{$f};
 
@@ -576,7 +592,8 @@ sub jhref_card {
     name         => $self->truncate( $content->{owner}, 64 ),
     expiry_month => sprintf( '%02d', $content->{expiry_month} ),
     expiry_year  => sprintf( '%02d', $content->{expiry_year} ),
-    cvd          => $content->{cvv2},
+
+    $content->{cvv2} ? ( cvd => $content->{cvv2} ) : (),
   }
 }