[ic] Verifone IPCharge

Richard Siddall richard.siddall at elirion.net
Fri Mar 20 22:35:21 UTC 2009

Bill Carr wrote:
> I'm not quite sure if that would be the BOP way. The guide for backend  
> module developers suggests using BOP::AuthorizeNet as an example. In  
> that example no parameters are passed to the BOP constructor other  
> than the processor. A subsequent call to the 'content' method sets up  
> the parameters necessary for a transaction. It might seem a little  
> awkward for users outside of Interchange to put some parameters in the  
> constructor call and some in the content call. Of course inside the  
> Interchange world the users are just setting up parameters via  
> '[charge ....]' or 'Route onlinepayment .....' so it would not really  
> matter to them. I do think it is reasonable to be able to place all  
> the parameters necessary for a given transaction in the content method  
> call. That be said I think we do need  our bloated exta_query_params  
> option.

That's probably because BOP::AuthorizeNet doesn't require extra
parameters.  Have a look at the way Ivan Kohler handles it in Freeside:
http://www.freeside.biz/freeside/demo.html (log into the back end as
guest/guest, pull up Configuration \ Settings and scroll down to the
Business-OnlinePayment stuff).  The additional parameters are all passed
as options to the constructor.

Passing extra parameters to the content call for a specific processor
just ties your code to that processor.  (It doesn't much matter in 
Vend::Payment::BusinessOnlinePayment as everything's done in the one 
subroutine, but it will when your BOP::IPCharge module gets used 
elsewhere.)  If the processor needs extra data to process a transaction, 
I think you handle that in the submit method, which can access the extra 
data you passed to the constructor.



More information about the interchange-users mailing list