[freeside-users] Export ACH info
William Pearson
william at cnsp.net
Fri Feb 15 15:26:01 PST 2019
What does this script do? I’m no programmer, but it appears to export data.
Will - NMSURF
cust_main.export
#!/usr/bin/perl
use strict;
use Text::CSV_XS;
use FS::UID qw(adminsuidsetup);
use FS::Record qw(qsearch);
use FS::cust_main;
my @fields = qw(
custnum
status
last
first
company
address1
address2
city
county
state
zip
country
daytime
night
mobile
fax
ship_address1
ship_address2
ship_city
ship_county
ship_state
ship_zip
ship_country
ship_daytime
ship_night
ship_mobile
ship_fax
invoicing_list_emailonly_scalar
payby
balance
);
push @fields,
#Billing Type: Credit Card
{ 'header' => 'Credit Card number',
'callback' => sub { my $c_m = shift;
$c_m->payby =~ /^(CARD|DCRD)$/ ? $c_m->payinfo : '' ;
},
},
{ 'header' => 'Expiration on card',
'callback' => sub { my $c_m = shift;
return '' unless $c_m->payby =~ /^(CARD|DCRD)$/;
$c_m->paydate =~ /^(\d{4})-(\d{2})-\d{2}$/ or die;
return "$2/$1";
},
},
{ 'header' => 'Name on card',
'callback' => sub { my $c_m = shift;
$c_m->payby =~ /^(CARD|DCRD)$/ ? $c_m->paydname : '' ;
},
},
#Billing Type: Electronic check
{ 'header' => 'ABA/Routing number',
'callback' => sub { my $c_m = shift;
return '' unless $c_m->payby =~ /^(CHEK|DCHK)$/;
From: Nathan Kennedy
Sent: Friday, February 15, 2019 11:21 AM
To: freeside-users at freeside.biz
Subject: Re: [freeside-users] Export ACH info
On Fri, 2019-02-15 at 10:44 -0700, William Pearson wrote:
Trying to export ACH info into another system, is it possible to export ACH and unmask the X's so we can import the data into a new system? Haven't found a way.
Hello Will,
The payment information is in the cust_payby table and you will need to use the key stored in the encryptionprivatekey setting to decrypt the payinfo field.
--
Nathan Kennedy
Contracted Professional IT
(360) 637-1090
https://www.nkent.us/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.freeside.biz/pipermail/freeside-users/attachments/20190215/b8f3a96b/attachment.html>
More information about the freeside-users
mailing list