$VERSION = '0.01';
$me = 'Business::OnlinePayment::Jety';
-$DEBUG = 1;
+$DEBUG = 0;
my @fields = (qw(
username
programdesc
ref
bankname
+ bankcity
+ bankstate
accountaba
accountdda
amount
last_name => 'lastname',
address => 'address1',
bank_name => 'bankname',
+ bank_city => 'bankcity',
+ bank_state => 'bankstate',
account_number => 'accountdda',
routing_code => 'accountaba',
);
die "Jety interface only supports Normal Authorization.\n"
if(lc($content->{action}) ne 'normal authorization');
- $content->{'function'} = 'ach';
+ $content->{'function'} = 'echeck';
$content->{'programdesc'} = '415-462-1624 Business::OnlinePayment::Jety';
$content->{'ref'} = time2str('%Y%m%d',time).'-'.int(rand(1000000));
+
+ $content->{'bankname'} ||= 'unknown';
+ $content->{'bankcity'} ||= 'unknown';
+ $content->{'bankstate'} ||= 'XX';
+
return;
}
$Business::OnlinePayment::HTTPS::DEBUG = $DEBUG;
$DB::single = $DEBUG;
+ # strip existent but empty fields so that required_fields works right
+ foreach(keys(%{$self->{_content}})) {
+ delete $self->{_content}->{$_}
+ if (!defined($self->{_content}->{$_} ) or
+ $self->{_content}->{$_} eq '');
+ }
+
$self->required_fields(qw(
type
action