[freeside-commits] freeside/FS/FS cust_main.pm, 1.271.2.13, 1.271.2.14
Jeff Finucane,420,,
jeff at wavetail.420.am
Fri Jun 15 11:44:02 PDT 2007
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv4262/FS/FS
Modified Files:
Tag: FREESIDE_1_7_BRANCH
cust_main.pm
Log Message:
paydate option for realtime_refund_bop and UI entry for cust_pay records without it (#1662 UI)
Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.271.2.13
retrieving revision 1.271.2.14
diff -u -d -r1.271.2.13 -r1.271.2.14
--- cust_main.pm 15 Jun 2007 00:58:18 -0000 1.271.2.13
+++ cust_main.pm 15 Jun 2007 18:44:00 -0000 1.271.2.14
@@ -2898,7 +2898,7 @@
Available methods are: I<CC>, I<ECHECK> and I<LEC>
-Available options are: I<amount>, I<reason>, I<paynum>
+Available options are: I<amount>, I<reason>, I<paynum>, I<paydate>
Most gateways require a reference to an original payment transaction to refund,
so you probably need to specify a I<paynum>.
@@ -2907,6 +2907,9 @@
I<reason> specifies a reason for the refund.
+I<paydate> specifies the expiration date for a credit card overriding the
+value from the customer record or the payment record. Specified as yyyy-mm-dd
+
Implementation note: If I<amount> is unspecified or equal to the amount of the
orignal payment, first an attempt is made to "void" the transaction via
the gateway (to cancel a not-yet settled transaction) and then if that fails,
@@ -3107,11 +3110,13 @@
if ( $cust_pay ) {
$content{card_number} = $payinfo = $cust_pay->payinfo;
- $cust_pay->paydate =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/ &&
- ($content{expiration} = "$2/$1"); # where available
+ (exists($options{'paydate'}) ? $options{'paydate'} : $cust_pay->paydate)
+ =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/ &&
+ ($content{expiration} = "$2/$1"); # where available
} else {
$content{card_number} = $payinfo = $self->payinfo;
- $self->paydate =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/;
+ (exists($options{'paydate'}) ? $options{'paydate'} : $self->paydate)
+ =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/;
$content{expiration} = "$2/$1";
}
More information about the freeside-commits
mailing list