pass email, phone and ip adderss to B:OP when doing refunds, hopefully this will...
authorivan <ivan>
Mon, 14 Aug 2006 13:28:56 +0000 (13:28 +0000)
committerivan <ivan>
Mon, 14 Aug 2006 13:28:56 +0000 (13:28 +0000)
FS/FS/cust_main.pm

index 7962f6d..95097da 100644 (file)
@@ -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 )