Saturday, September 26, 2009

architecture question: payments

I'm writing an app for an organization that charges a fee for
membership and also has an annual meeting for which a further fee is
required. Online payments will be handled though Moneris (similar to
PayPal), and I'm considering writing a component for that. I need to
deal with the following cases:

new membership
membership renewal
new/renewal membership + event
event only
event only (as a guest-more expensive)

So, I've got both MembersController & EventsController involved. But,
I may have a situation where both membership & event signup need to be
handled simultaneously. Aside from the question of which controller to
use for that situation, there's also an issue with processing I need
to do after the transaction has completed. For memberships, that means
creating a password and sending out a "welcome" email.

Additionally, Moneris seems to only allow a single response URL to be
registered at their site. Unlike with PayPal, I can't send the URL in
the form.

So, I'm considering dropping the component idea and creating a
PaymentsController instead. That would seem to take care of one part
of the problem, but leads to others. For instance, for a new
membership, I'd redirect from MembersController::add() method to this
controller to then go on to deal with payment. Once that was dealt
with, I could redirect back to MembersController::addConfirm(),
passing the Member.id. But that's just the sort of method I'd want to
be private, so I see a problem there.

Also, I've still got the obvious problem of dealing with both
membership and an event registration. So, I'm wondering if the
PaymentsController should use both Member & Event and deal with
post-transaction stuff itself.

Any thoughts? I'm hoping that I'm just missing something obvious and
it doesn't need to be this complicated.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: