summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormark <mark>2010-03-12 10:52:59 +0000
committermark <mark>2010-03-12 10:52:59 +0000
commit4014c3ffc450499ef9813ee8c86db093e4fcf86a (patch)
tree23fb5332ac01b45cc30a1b4d0afe4bd774418a45
parent5116a9f400ed93aca60fa1472e7cb2d5eb6e08c9 (diff)
RT#7180: backport ECHECK_void_requires_account
-rw-r--r--FS/FS/cust_main.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index a2569f7..29d6fae 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -3493,6 +3493,18 @@ sub realtime_refund_bop {
) {
warn " attempting void\n" if $DEBUG > 1;
my $void = new Business::OnlinePayment( $processor, @bop_options );
+ if( $void->can('info') ) { # backported from 1.9
+ if( $cust_pay->payby eq 'CARD'
+ and $void->info('CC_void_requires_card') ) {
+ $content{'card_number'} = $cust_pay->payinfo;
+ }
+ elsif( $cust_pay->payby eq 'CHEK'
+ and $void->info('ECHECK_void_requires_account') ) {
+ @content{'account_number', 'routing_code'} =
+ split('@', $cust_pay->payinfo);
+ $content{'name'} = $self->get('first') . ' ' . $self->get('last');
+ }
+ }
$void->content( 'action' => 'void', %content );
$void->submit();
if ( $void->is_success ) {