[ic] question on BoA and Vend::Payment.pm

Mike Heins interchange-users@icdevgroup.org
Thu Nov 7 00:50:01 2002


Quoting Jeff Dafoe (jeff@badtz-maru.com):
> > >     I am interested in any thoughts on this.  I suspect that $opt->{id},
> in
> > > my case, is created somewhere but has an undef value.
> >
> > I don't think this is what you want -- it would not allow a value of
> > 0 to be set in any parameter of any payment route.
> >
> > The best thing is to just make sure you have the proper thing defined...
> 
>     I have been thinking about this.  The issue is that I do have the proper
> thing defined, the actual problem in my case is this, again from
> charge_param:
> 
> =====
>         ## JDD hack to fix empty ID string being returned
>         return $opt->{$name}            if $opt->{$name};
> 
>         # "gateway" and possibly other future options
>         return undef if $ignore_mv_payment{$name};
> 
>         # Now check Variable space as last resort
>         my $uname = "MV_PAYMENT_\U$name";
> =====
> 
>     As per the BoA.pm documentation, I do have MV_PAYMENT_ID set.  The
> problem is when the above code is called, when BoA.pm calls
> charge_param('id'), the "id" key/property apparently exists in $opt .

Since I didn't write the BoA docs or module, I don't know, but the
Vend::Payment behavior is what really applies here.

The preferences is to set it in your route:

Route   boa   id   "__MV_PAYMENT_ID__"

If you happen to have:

Route   boa   id   ""

Then you will see the behavior you mention. Otherwise, it should fall
through to something set elsewhere. If you name it in the route, 
it should work fine.

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

People who want to share their religious views with you
almost never want you to share yours with them. -- Dave Barry