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) »
  • How to implement custom hook for capturing Credit Card type
Pages: [1]

Author Topic: How to implement custom hook for capturing Credit Card type  (Read 814 times)

foilhl2

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: Drupal
  • MySQL version: 5.4
  • PHP version: 5.2
How to implement custom hook for capturing Credit Card type
August 27, 2012, 02:00:34 pm
I am new to CiviCRM system and to Drupal as well, and am seeking some advice for the following need:

Authorize.net sends deposits to our bank every single day. And we get 3 deposits: one for AmEx, one for Visa/Mastercard, one for eChecks. There are noted in Authorize.net under the "Card" field and has values of M, V, A, and something else for eCheck. So our accountant needs to segment the donation reports by day and then by card type.

I am clear on the idea of creating custom hooks with Drupal and have looked into that a bit, but do not understand the best method for implementing this in order to catch the Credit Card type value during the form submission, and where to record it in Civi for our reports.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: How to implement custom hook for capturing Credit Card type
August 27, 2012, 02:36:47 pm
Check hook_civicrm_postProcess
Try asking your question on the new CiviCRM help site.

theshee9

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.2.x
  • CMS version: Joomla 2.5+
  • MySQL version: 4+
  • PHP version: 5+
Re: How to implement custom hook for capturing Credit Card type
December 20, 2012, 09:56:20 am
Hi All -

I too am trying to capture (and report on) the credit card type for the transactions.

I've reviewed the documentation about creating the hooks, but I think I must be missing a few steps.

I'm using Joomla 2.5.8 with Civi 4.2.4  (on LAMP Stack).

Like foihl2, the clients' financial team would like to be able to report on which particular cards were used.

I guess I'm looking for a little more clarification on how we might add this hook so that we can report on card types across the board - from events to contributions, etc.

Any help is greatly appreciated!

James
Recent CiviCRM Deployments:
Walsh Jesuit High School: www.walshjesuit.org

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: How to implement custom hook for capturing Credit Card type
December 20, 2012, 10:10:27 am

check:

http://book.civicrm.org/developer/
http://wiki.civicrm.org/confluence/display/CRMDOC42/Hook+Reference

The card type is not stored in the Civi DB, so:

1.Store the card type in the DB (maybe in a custom group that extends contributions)

2. Write a report that shows the card type and gives your inancial team the info they need

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: How to implement custom hook for capturing Credit Card type
December 21, 2012, 03:31:36 pm
If any of the built-in contribution reports support custom fields then you can skip step 2 :)
Try asking your question on the new CiviCRM help site.

sibro

  • I post occasionally
  • **
  • Posts: 47
  • Karma: 2
  • CiviCRM version: 4.4.5
  • CMS version: Drupal 7.27
  • MySQL version: 5.5
  • PHP version: 5.4
Re: How to implement custom hook for capturing Credit Card type
December 22, 2012, 03:59:57 am
I think you are working to hard on a simple problem. The first digit of the credit card number tells the type of card. 3 is American Express, 4 is Visa and 5 is Mastercard. Using the card type the user supplies will complicate the reconciliation if a user clicks on the wrong type.
Bruce

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • How to implement custom hook for capturing Credit Card type

This forum was archived on 2017-11-26.