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) »
  • Mandatory fields for credit card payments
Pages: [1]

Author Topic: Mandatory fields for credit card payments  (Read 6157 times)

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Mandatory fields for credit card payments
June 05, 2008, 06:31:26 pm
Background ...

I would like for people making payments through our site to only need to enter the following data:
  • email address, so Civi can identify the contact
  • The minimum cc details: cc type, cc number, cc cardholder name as a single field, expiry date, and (optionally?) security code

Some recent research indicates people are more likely to make donations when they are asked for less information (see http://www.donordigital.com/).

If I'm accepting a donation or a payment for an event then I don't need billing address information. If I did need it I can add it as part of a profile.

Therefore ...

Why does Civi require this information? What would break if the billing address information wasn't supplied? Why is the cardholder name requested as 3 fields (is this to facilitate getting data about the contact, or is it a North American way of doing things [forgive me, I'm an Aussie, and we only use 1 field!])

Thanks,
Ken

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: Mandatory fields for credit card payments
June 05, 2008, 08:14:09 pm
Ken:

good questions to ask :)

My initial response was that these fields are required by PayPal (which was the first processor we built the system on). Hence we need them there. I then checked the docs to see what is really required by PayPal and realized that they dont need the address fields. They however like the name split up into firstname and lastname. You can check the docs here: https://www.paypal.com/en_US/pdf/PP_NVPAPI_DeveloperGuide.pdf

Sending the address in allows the transaction processor to do an address verification check and accept/reject the card based on the code there. We have not done too much with that, but at groundspring.org we did use the AVSCODE a fair amount, and rejected the transaction if it seemed potentially fraudulent. Considering that fraud is a big thing, i suspect the address check (and doing something with the AVSCODE return value) will become fairly important at some stage

just some things to think about ..

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

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Mandatory fields for credit card payments
June 06, 2008, 05:36:24 pm
Thanks for your response, Lobo!

Your reply has stimulated my thinking on this issue (though the following points may not yet be coherent) ...
  • I'm testing with a payment processor contributed by Peter Barwell for the eway.com.au gateway (nice job, Pete!)
  • The eWay gateway considers the address fields optional, and has the card holder name in a single field
  • While fraud is a huge issue, I suspect that most fraud is committed when making purchases of goods, rather than when making donations (excepting altruistic criminals like Robin Hood) and when registering for events (we could grab them when they show up on the day!)
  • If I'm logged into my CMS (Joomla! in my case), will CiviCRM populate these address fields with my billing details?
  • As I'm giving CiviCRM my email address as I pay, could Civi do a look-up of the billing details? I guess this will present privacy issues (I could look up George W Bush's address by entering his email address!)
  • Could a method be added to the payment processors which returned a mask indicating which fields were to be entered and which were mandatory? The default response would be to let the calling logic decide (as currently) but payment processors could then respond by saying "display these fields; these are mandatory, and these are optional". Payment processors could even be configured by the administrator (who could choose whether the field is optional)
  • Could you kindly point me to the code for building forms for donations? I think it is Event/Form/Registration/Register.php for events and Contribute/Form/Contribution/Main.php for contributions, but I'm not a PHP coder.

Thanks,
Ken

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: Mandatory fields for credit card payments
June 06, 2008, 09:46:12 pm

Ken:

1. If logged in CiviCRM should get the details from your contact record

2. The credit card fields are built at: CRM/Core/Payment/Form.php, function buildCreditCard. You will also need to edit the tpl files

CRM/Contribute/Form/Contribution/Main.tpl
CRM/Event/Form/Registration/Register.tpl

In 2.1 i've centralized the code to use the same tpl file (CRM/Form/billing.tpl)

3. Yes, we can do a lookup, but we wont to avoid getting into a privacy issue. Using email as a key is not a smart thing to do in general

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Mandatory fields for credit card payments

This forum was archived on 2017-11-26.