CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Direct Debit fields
Pages: [1]

Author Topic: Direct Debit fields  (Read 412 times)

adixon

  • I post frequently
  • ***
  • Posts: 314
  • Karma: 19
    • Blackfly Solutions
Direct Debit fields
November 27, 2013, 09:13:51 am
I'm trying to implement direct debit for my custom payment processor, implemented in a 'module' extension.

The civicrm core code that supports this (in the payment page form) doesn't seem to be well-documented, but since I thought I was starting from scratch here, it's nice to see this.

Of course, each payment processor is going to have different information to collect - in this case, it needs an extra selection of checking vs. savings account.

In my example, I've got both a cc and direct debit payment processors enabled for a contribution page, so it does some nice ajaxy updating of those fields.

Unfortunately, I've tried adding my new field in buildForm hook (at which point, I can see that the form object itself has added these fields), but it seems to have no effect.

I've tried adding them naively with the standard quickform method, but when I look in the core code, I can see there's some fancy non-quickform-standard stuff going on, so I also tried adding an extra element to the form->_paymentFields, which is what what core seems to do. Neither has any effect.

I suspect there's some other form operation I have to do to rebake those fields into the actual form that gets pulled out via ajax?

adixon

  • I post frequently
  • ***
  • Posts: 314
  • Karma: 19
    • Blackfly Solutions
Re: Direct Debit fields
November 27, 2013, 09:41:20 am
Actually, to simplify my problem, i converted it back to only using on payment processor, but I have the same issue, so it's not ajaxy related.

I did look at sepa_dd for inspiration, but they're doing the same thing I am. I'll try installing it and seeing if it works, though I'm a little scared, that's a lot of code and I'm not quite sure what it might do ...

adixon

  • I post frequently
  • ***
  • Posts: 314
  • Karma: 19
    • Blackfly Solutions
Re: Direct Debit fields
November 27, 2013, 09:48:25 am
Hmm, I think I might have to overwrite a template as well...

adixon

  • I post frequently
  • ***
  • Posts: 314
  • Karma: 19
    • Blackfly Solutions
Re: Direct Debit fields
November 27, 2013, 10:28:07 am
Yes, that was it, I think I'm getting the hang of these quick forms thingys ...

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Direct Debit fields

This forum was archived on 2017-11-26.