[interchange] Properly initialize BOP supplemental parameters.

David Christensen <[email protected]>
Newsgroups gmane.comp.web.interchange.cvs
Message-ID <[email protected]>
commit 5e5ffbbb4ee4468c023a60e4ee07f01b1154a7cb
Author: David Christensen <[email protected]>
Date:   Mon Feb 22 22:54:56 2010 -0600

    Properly initialize BOP supplemental parameters.
    
    This fixes a bug where supplemental parameters passed to the payment
    module to initialize the Business::OnlinePayment gateway object get a
    value of 1 instead of what's in your catalog.cfg or
    products/variable.txt.
    
    Patch by Richard Siddall, with minor bugfixes by David Christensen

 lib/Vend/Payment/BusinessOnlinePayment.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lib/Vend/Payment/BusinessOnlinePayment.pm b/lib/Vend/Payment/BusinessOnlinePayment.pm
index 2caad9a..466d8a8 100644
--- a/lib/Vend/Payment/BusinessOnlinePayment.pm
+++ b/lib/Vend/Payment/BusinessOnlinePayment.pm
@@ -226,7 +226,7 @@ sub onlinepayment {
 
   #processor options!
   my %ignore = map { $_=>1 } qw(gateway processor id secret transaction );
-  my %options = map  { $_=>1 }
+  my %options = map { $_ => ($opt->{$_} || $main::Variable->{"MV_PAYMENT_" . uc $_ }) }
                 grep { !$ignore{$_} } (
                                         keys(%$opt),
                                         map { s/^MV_PAYMENT_//; lc($_); }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.