[ic] Using charge inside of [perl] [/perl] or UserTag

Shawn Mathews interchange-users@icdevgroup.org
Thu Oct 17 22:14:00 2002


Ok,

A global UserTag.......

does that go into interchange.cfg? or someplace else?

Shawn Mathews
shawn@oceanebi.com

----- Original Message -----
From: "Mike Heins" <mike@perusion.com>
To: <interchange-users@icdevgroup.org>
Sent: Thursday, October 17, 2002 9:03 PM
Subject: Re: [ic] Using charge inside of [perl] [/perl] or UserTag


>
> Quoting Shawn Mathews (shawn@oceanebi.com):
> > Hi All,
> >
> > I sure hope somebody can tell me what I'm doing wrong or why what I'm
trying
> > to do isn't possible....
> >
> > I'm attemping to allow administrators to void/refund transactions from
> > within the admin interface. I added some code to the
order_delete_archive
> > file to call the charge tag with some additional info.
> >
> > When interchange calls the charge tag I get the follow error:
> >   payment routine 'ezic' returned error: require trapped by operation
mask
> > at (tag 'perl') line 3.
> >
> > Code I added to order_delete_archive:
> >
> > # Get The Fields Needed for a Cancel
> >                   for(grep $_, @{$CGI_array->{order}}) {
> >                         my $trans_id, $order_id;
> >                         $order_id =$db->field($_,'order_number');
> >                         $trans_id = $db->field($_,'order_id');
> >                         $Tag->log({file=>'orderadmin.log',
> >                            create=>1,
> >                            type=>'error'},"Canceling Order for $order_id
and
> > $trans_id\n");
> >                         my $rslt = $Tag->charge({
> >                                 'route' => 'ezic',
> >                                 'transaction' => 'reverse',
> >                                 'master_id' => $trans_id,
> >                                 'order_id' => $order_id});
> >                         $Tag->log({file=>'orderadmin.log',
> >                            type=>'error'},"cancel result: ".$rslt."\n");
> >                         if ($rslt) {
> >                           $db->set_field($_,$action_col,$value);
> >                         }
> >                   } # End For Loop
> >
> >
> >
> > My payment module is attached. (I basically copied the Authorizenet
module
> > and made changes to support the processor EZIC http://www.ezic.com)
>
> Unfortunately, you cannot do this in the page, for the Crypt::SSLeay
> module does a runtime require at all times. (For Safe compatiblity, it
> would be nice if they used %INC first.)
>
> You need to either put it in a global UserTag or use embedded perl to
> collect the arguments, break out to ITL, do the charge and collect the
> result, then fall back into embedded perl.
>
> --
> Mike Heins
> Perusion -- Expert Interchange Consulting    http://www.perusion.com/
> phone +1.513.523.7621      <mike@perusion.com>
>
> If you think nobody cares if you're alive, try missing a couple of
> car payments.  -- Earl Wilson
>
> _______________________________________________
> interchange-users mailing list
> interchange-users@icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
>