X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main%2FBilling_Realtime.pm;h=60554957bd83bf4d997373f066215f6baaadc409;hb=197c503fbe112896332e9ca5f17c9c5a2ea4bb87;hp=ece07b6a3d5a6629fd3da718916635b79c505498;hpb=28da97099bf6b01659718a0c6a1086c9a0f22729;p=freeside.git diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm index ece07b6a3..60554957b 100644 --- a/FS/FS/cust_main/Billing_Realtime.pm +++ b/FS/FS/cust_main/Billing_Realtime.pm @@ -3,6 +3,9 @@ package FS::cust_main::Billing_Realtime; use strict; use vars qw( $conf $DEBUG $me ); use vars qw( $realtime_bop_decline_quiet ); #ugh +use Data::Dumper; +use Digest::MD5 qw(md5_base64); +use Business::CreditCard 0.28; use FS::UID qw( dbh ); use FS::Record qw( qsearch qsearchs ); use FS::Misc qw( send_email ); @@ -30,7 +33,7 @@ FS::cust_main::Billing_Realtime - Realtime billing mixin for cust_main =head1 SYNOPSIS -=head1 DESCRIPTIONS +=head1 DESCRIPTION These methods are available on FS::cust_main objects. @@ -136,6 +139,8 @@ I is a session identifier associated with this payment. I allows payment capture to unlock export jobs +I attempts to take a discount by prepaying for discount_term + (moved from cust_bill) (probably should get realtime_{card,ach,lec} here too) =cut @@ -744,6 +749,7 @@ sub _realtime_bop_result { 'paybatch' => $paybatch, 'paydate' => $cust_pay_pending->paydate, 'pkgnum' => $cust_pay_pending->pkgnum, + 'discount_term' => $options{'discount_term'}, } ); #doesn't hurt to know, even though the dup check is in cust_pay_pending now $cust_pay->payunique( $options{payunique} )