add business-onlinepayment-email_customer flag
authorivan <ivan>
Fri, 9 Nov 2007 18:59:12 +0000 (18:59 +0000)
committerivan <ivan>
Fri, 9 Nov 2007 18:59:12 +0000 (18:59 +0000)
FS/FS/Conf.pm
FS/FS/cust_main.pm

index 56f60d5..504c1b9 100644 (file)
@@ -441,6 +441,13 @@ worry that config_items is freeside-specific and icky.
   },
 
   {
+    'key'         => 'business-onlinepayment-email_customer',
+    'section'     => 'billing',
+    'description' => 'Controls the "email_customer" flag used by some Business::OnlinePayment processors to enable customer receipts.',
+    'type'        => 'checkbox',
+  },
+
+  {
     'key'         => 'countrydefault',
     'section'     => 'UI',
     'description' => 'Default two-letter country code (if not supplied, the default is `US\')',
index c95ebf7..dced11f 100644 (file)
@@ -2588,6 +2588,10 @@ sub realtime_bop {
   $content{invoice_number} = $options{'invnum'}
     if exists($options{'invnum'}) && length($options{'invnum'});
 
+  $content{email_customer} = 
+    (    $conf->exists('business-onlinepayment-email_customer')
+      || $conf->exists('business-onlinepayment-email-override') );
+      
   my $paydate = '';
   if ( $method eq 'CC' ) {