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 CiviEvent (Moderator: Yashodha Chaku) »
  • Online rego receipt - No credit card - $contributionMode not set
Pages: [1]

Author Topic: Online rego receipt - No credit card - $contributionMode not set  (Read 408 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
Online rego receipt - No credit card - $contributionMode not set
December 03, 2013, 02:12:19 pm
The default TPL for event registration uses $contributeMode to decide whether to show Credit Card details.

But there are 2 problems. $contributeMode is always NULL, and the $credit_card_number is not munged. Is this a design feature (don't show credit card because it's not munged) or a flaw?

On line 1098 of CRM/Event/BAO/Event.php, the $contributeMode TPL param is set to NULL ...
Code: [Select]
        $tplParams = array_merge($values, $participantParams, array(
            'email' => $email,
            'confirm_email_text' => CRM_Utils_Array::value('confirm_email_text', $values['event']),
            'isShowLocation' => CRM_Utils_Array::value('is_show_location', $values['event']),
            'contributeMode' => NULL,
            'participantID' => $participantId,
            'conference_sessions' => $sessions,
          ));

As far as I can tell, 'contributeMode' is not set in $values or $participantParams, but even if it was, this piece of code blows it away.

Guidance please!

Ken

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: Online rego receipt - No credit card - $contributionMode not set
June 07, 2014, 06:34:11 am
There are 3 issues here.
  • $contributeMode is set to NULL while the TPL expects it to be 'direct' or some other value.
  • The credit_card_number is not munged
  • The credit_card_exp_date needs to be converted from an Array to a date string

I'll raise an issue an issue and create a PR.

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: Online rego receipt - No credit card - $contributionMode not set
June 07, 2014, 06:50:15 am
Issue https://issues.civicrm.org/jira/browse/CRM-14813

PR https://github.com/civicrm/civicrm-core/pull/3453

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Online rego receipt - No credit card - $contributionMode not set

This forum was archived on 2017-11-26.