summaryrefslogtreecommitdiff
path: root/IPPay.pm
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2021-03-30 09:28:31 -0700
committerIvan Kohler <ivan@freeside.biz>2021-03-30 09:28:31 -0700
commitec9bcc69c60f01f60cdc9b628355cd6ac2f2c8bc (patch)
tree1a88353f07489fb0e2d9e31b08af0984f5a0f836 /IPPay.pm
parent4c36b297988c48376171733adce79d60582e9207 (diff)
ACH SEC code: Allow setting, default to CCD for business accounts, PPD otherwise (was: always PPD)
Diffstat (limited to 'IPPay.pm')
-rw-r--r--IPPay.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/IPPay.pm b/IPPay.pm
index 8060892..666f5e8 100644
--- a/IPPay.pm
+++ b/IPPay.pm
@@ -448,7 +448,8 @@ sub _xmlwrite {
if ( $item eq 'ACH' ) {
$att{'Type'} = $self->{_content}->{'account_type'}
if $self->{_content}->{'account_type'}; #necessary so we don't pass empty?
- $att{'SEC'} = 'PPD';
+ $att{'SEC'} = $self->{_content}->{'nacha_sec_code'}
+ || ( $att{'Type'} =~ /business/i ? 'CCD' : 'PPD' );
}
$writer->startTag($item, %att);