From: ivan Date: Mon, 14 Aug 2006 13:28:56 +0000 (+0000) Subject: pass email, phone and ip adderss to B:OP when doing refunds, hopefully this will... X-Git-Tag: BEFORE_FINAL_MASONIZE~29 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=16a001f9e22bdb68e85d6c23697bfb5f7b8fa8f4;p=freeside.git pass email, phone and ip adderss to B:OP when doing refunds, hopefully this will fix OpenECHO refunds --- diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 7962f6dfa..95097da71 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -2850,6 +2850,22 @@ sub realtime_refund_bop { $payname = "$payfirst $paylast"; } + my @invoicing_list = grep { $_ ne 'POST' } $self->invoicing_list; + if ( $conf->exists('emailinvoiceauto') + || ( $conf->exists('emailinvoiceonly') && ! @invoicing_list ) ) { + push @invoicing_list, $self->all_emails; + } + + my $email = ($conf->exists('business-onlinepayment-email-override')) + ? $conf->config('business-onlinepayment-email-override') + : $invoicing_list[0]; + + my $payip = exists($options{'payip'}) + ? $options{'payip'} + : $self->payip; + $content{customer_ip} = $payip + if length($payip); + my $payinfo = ''; if ( $method eq 'CC' ) { @@ -2888,6 +2904,8 @@ sub realtime_refund_bop { 'state' => $self->state, 'zip' => $self->zip, 'country' => $self->country, + 'email' => $email, + 'phone' => $self->daytime || $self->night, %content, #after ); warn join('', map { " $_ => $sub_content{$_}\n" } keys %sub_content )