[freeside-users] Business::OnlinePayment Error
Randall Lucas
rlucas at tercent.com
Sun Sep 11 11:30:56 PDT 2005
Dollars to donuts you haven't "use'd"
Business::OnlinePayment::LinkPoint -- the Perl chicanery you quote
blesses $self into $subclass without necessarily loading $subclass.
When you call build_subs() on $self, it searches that namespace
(which exists) but isn't finding the code (because the .pm file
wasn't use'd or require'd).
Make sure Business/OnlinePayment/LinkPoint.pm is in @INC and that
it's getting use'd or require'd and your day will be nicer.
Randall
On Sep 11, 2005, at 4:11 AM, sales at michianawireless.com wrote:
> Hello,
>
> I am trying to get the cc processing running on freeside for
> Linkpoint. I
> have both packages installed:
>
> Business::OnlinePayment::LinkPoint
> Business::OnlinePayment
> As well as lpperl.pm and my store.pem file. The freeside billing info
> section is setup using:
>
> LinkPoint
> Storenum
> Password
>
> When I go to post a test payment using a real credit card I get the
> following error:
>
> error: Can't locate object method "build_subs" via package
> "Business::OnlinePayment::LinkPoint" at
> /usr/lib/perl5/site_perl/5.8.6/Business/OnlinePayment.pm line 44.
>
> context: ...
> 40: }
> 41:
> 42: my $self = bless {processor => $processor}, $subclass;
> 43: $self->build_subs(keys %fields);
> 44:
> 45: if($self->can("set_defaults")) {
> 46: $self->set_defaults();
> 47: }
> 48:
> ...
>
> code stack: /usr/lib/perl5/site_perl/5.8.6/Business/
> OnlinePayment.pm:44
> /usr/lib/perl5/site_perl/5.8.6/FS/cust_main.pm:2137
> /var/www/html/freeside/misc/process/payment.cgi:97
> /var/www/html/freeside/autohandler:1
>
> However looking a LinkPoint.pm, I do find:
>
> sub build_subs {
> my $self = shift;
> foreach(@_) {
> #no warnings; #not 5.005
> local($^W)=0;
> eval "sub $_ { my \$self = shift; if(\@_) { \$self->{$_} =
> shift; }
> return \$self->{$_}; }";
> }
> }
>
> Within it. Why am I seeing this error then?
>
> Thanks,
> John
>
>
> _______________________________________________
> freeside-users mailing list
> freeside-users at sisd.com
> http://420.am/cgi-bin/mailman/listinfo/freeside-users
>
More information about the freeside-users
mailing list