Fwd: Re: [Handel] credit card processing questions

charlie Bowman cbowmanschool at yahoo.com
Fri Dec 9 06:04:38 CET 2005


TreeTribes is the site I'm working on.

Now its starting to come together.  I need to create a
package TreeTribes::Authorize that I would put in
TreeTribes/lib/TreeTribes/Controller/Authorize.pm.  
It would be as follows.  My questions follow the
package

  package TreeTribes::Authorize;
  use Handel::Constants qw(:checkout);
  use base 'Handel::Checkout::Plugin';
  use Business::OnlinePayment::SomePaymentProcessor

  sub register {
    my ($self, $ctx) = @_;

    $ctx->add_handler(CHECKOUT_PHASE_AUTHORIZE,
\&process_credit_card);
  };

  sub process_credit_card {
    my ($self, $ctx) = @_;

    ...online payment code here...

    return CHECKOUT_HANDLER_OK;
  };

1. Is this correct?  The init sub runs first then the
register sub is called by default so that the phase
can be associated with the proper sub routine in this
package.
2. next is the setup function to do any setup work you
need to do.
2. the next sub routine to run is whatever sub you
have associated with the phase.  You do this with
add_handler.
3. teardown is the phase where you put your
housekeeper. (it cleans up any messes)
4. Where do I put this package?  Would it go into
TreeTribes/lib/TreeTribes/Controllor/ ?
5. currently I haven't created packages for authorize
and deliver.  How does Handel::Checkout handle these
missing plugins?  I'm assuming it just pretends that
it recieved CHECKOUT_HANDLER_OK.

Thanks again for the support!  




















Note: forwarded message attached.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
An embedded message was scrubbed...
From: charlie Bowman <cbowmanschool at yahoo.com>
Subject: Re: [Handel] credit card processing questions
Date: Thu, 8 Dec 2005 21:01:23 -0800 (PST)
Size: 2782
Url: http://lists.rawmode.org/pipermail/handel/attachments/20051208/0e88acbd/attachment.eml


More information about the Handel mailing list