X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fcardfortress.pm;h=68a1aea4e69faccd63bdae30f4fe9f376e95d344;hp=4916a6ee03cd3e80f9adae6f48913b169781977a;hb=74183581d97f1c258bc3104b71e1798c9b71d308;hpb=8e2372530191ae32938786363885aa4b540e29c7

diff --git a/FS/FS/part_export/cardfortress.pm b/FS/FS/part_export/cardfortress.pm
index 4916a6ee0..68a1aea4e 100644
--- a/FS/FS/part_export/cardfortress.pm
+++ b/FS/FS/part_export/cardfortress.pm
@@ -58,7 +58,22 @@ sub _export_replace {
 sub _export_delete {
   #my( $self, $svc_x ) = (shift, shift);
 
-  return 'deletion not yet supproted';
+  #well, we're just going to disable them for now, but there you go
+
+  eval "use Net::OpenSSH;";
+  return $@ if $@;
+
+  open my $def_in, '<', '/dev/null' or die "unable to open /dev/null";
+  my $ssh = Net::OpenSSH->new( $self->machine,
+                               default_stdin_fh => $def_in );
+
+  my $private_key = $ssh->run(
+    '/usr/local/bin/merchant_disable', map $svc_acct->$_, qw( username )
+  );
+  return $ssh->error if $ssh->error;
+
+  '';
+
 }
 
 1;