This is a follow on from a previous post, focusing on recuring payments.
I just wondered what the plans were with recurring payments? I read a bit about them in previous posts, but am unclear about a few things:
Firstly, where do they take place? Is it something Payments API deals with, is it something built into the payment providers - eg paypal/realex, or is it something built into the front end payment modules - eg webform pay/donations module?
Secondly, is it like a payment that just keeps happening again month after month, or is it a special kind of payment that has to have some kind of aggreement with the customer (like a direct debit in the UK)
Thirdly, how would it get recorded into the payment reports in Drupal?
To my mind this is a more important feature than the others mentioned in the previous post because i'm guessing are quite a few people looking for a lightweight alternative to Ubercart for subscriptions and recurring donations.
Many thanks for the module and the hard work, Joe
Comments
Comment #1
joecanti commentedHi,
I've been looking into this in a bit more depth, more specifically for the Realex payment gateway.
The workflow looks like this:
- Customer hits 'buy' and enters details.
- 1st XML token sent to Realex containing the card details, which are then stored with realex.
- 2nd XML token sent to Realex containing transaction information.
- Realex send xml back containing success/failure details.
- Your website then re-sends the second token monthly (or quarterly etc), and realex replies.
Please could you let me know which bits the pay module deals with and which bits the payment gateway deals with?
I would imagine it is the Pay or Webform Pay module which has to trigger the Pay-Realex module to resend the second XML file. I'm not sure whether this is in line with other gateway recurring methods or not.
Any info on this much appreciated,
Many thanks, Joe
Comment #2
univate commentedI maintain uc_recurring which adds recurring functionality to ubercart. I am interested in seeing better abstraction to payment gateways but not sure that having pay or webform_pay modules triggering the recurring payments is going to be the best way to go. This might be better handled in a separate module - pay_recurring.
There are various different methods that gateways can provide recurring functionality, but generally they are divided into to classes:
1) Hosted - where you send the details of the payment and recurring interval and the gateways does everything. In some cases gateways will send back notifications on renewal attempts so you can respond to these events (e.g. Paypal WPS subscriptions, Authorize.net ARB)
2) Triggered/tokenized - these are gateways where you just send the payment details, credit cards and a token is returned. When a payment needs to be processed you can use this token to trigger payments.
There is a third:
3) Store credit cards details yourself and use the normal (requires addition PCI compliance), in reality one of the better way to implement this would be to setup your own tokenized system (as in 2 above) separate from the normal web database and have a secure method to trigger payments. That way you can restrict access to the sensitive details.
The first step in pay is having a method for gateways to expose what functionality they implement. One option could be through the use of PHP interfaces:
This is not just limited to recurring payments, any payment feature can be implemented this way, where an interface is created to define a set of methods required to use that features. So this could be done for "refunds".
Comment #3
NewZeal commentedI am looking at creating a pay_recurring module, to go with a module that I maintain: http://drupal.org/project/listing . If anyone has any code already started then it would be appreciated if you could send it along.
Thanks
Comment #4
stella commentedI'd like to implement a recurring feature for the Realex payment gateway (pay_realex module), but am unsure how to proceed. It uses the tokenised method as described in comment #2 above.
I agree that the module providing the payment form (e.g. webform_pay) should not be responsible for triggering the recurring payment. However, unsure whether it should be the Pay module that is responsible or the payment gateway module. Maybe the Pay module should provide the framework, but allow each payment gateway module to implement their own variation as required?
I'm happy to work on a patch for this if we could agree on how best to go about it.
Comment #5
thehong commented