Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-15372 - Offline Registration w/ Credit Card Saves Processing Fee as Total Amount #4228

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions CRM/Event/Form/Participant.php
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ public function postProcess() {
// Eliminate contacts that have already been assigned to this event.
$dupeCheck = new CRM_Event_BAO_Participant;
$dupeCheck->contact_id = $dupeCheckContactId;
$dupeCheck->event_id = $this->_eventId;
$dupeCheck->event_id = $this->_eventId;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extraneous character on this line is throwing an error for me. Clearly an unintentional change due to some IDE setting.

$dupeCheck->find(TRUE);
if(!empty($dupeCheck->id)) {
$duplicateContacts++;
Expand Down Expand Up @@ -1287,7 +1287,11 @@ public function postProcess() {
$this->_params['role_id']
);
}
$participants[] = CRM_Event_Form_Registration::addParticipant($this, $contactID);

//CRM-15372 patch to fix fee amount replacing amount
$participantParams = $this->_params;
$participantParams['fee_amount'] = $this->_params["amount"];
$participants[] = CRM_Event_Form_Registration::addParticipant($participantParams, $contactID);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this patch i get a fatal error on back-office credit card event registration in TEST mode using Auth.net.
6 /Users/dgg/git/crm_v4.5/packages/DB/mysql.php(899): DB_common->raiseError(-1, NULL, NULL, NULL, "1364 ** Field 'participant_id' doesn't have a default value")
#7 /Users/dgg/git/crm_v4.5/packages/DB/mysql.php(328): DB_mysql->mysqlRaiseError()
#8 /Users/dgg/git/crm_v4.5/packages/DB/common.php(1216): DB_mysql->simpleQuery("INSERT INTO civicrm_participant_payment (contribution_id ) VALUES ( 119 ) ")
#9 /Users/dgg/git/crm_v4.5/packages/DB/DataObject.php(2442): DB_common->query("INSERT INTO civicrm_participant_payment (contribution_id ) VALUES ( 119 ) ")
#10 /Users/dgg/git/crm_v4.5/packages/DB/DataObject.php(1060): DB_DataObject->_query("INSERT INTO civicrm_participant_payment (contribution_id ) VALUES ( 119 ) ")
#11 /Users/dgg/git/crm_v4.5/CRM/Core/DAO.php(455): DB_DataObject->insert()
#12 /Users/dgg/git/crm_v4.5/CRM/Event/BAO/ParticipantPayment.php(63): CRM_Core_DAO->save()
#13 /Users/dgg/git/crm_v4.5/CRM/Event/Form/Participant.php(1310): CRM_Event_BAO_ParticipantPayment::create((Array:2), (Array:0))
#14 /Users/dgg/git/crm_v4.5/CRM/Core/Form.php(328): CRM_Event_Form_Participant->postProcess()
--- and then following notices ----
Notice: Trying to get property of non-object in CRM_Event_Form_Participant->postProcess() (line 1300 of /Users/dgg/git/crm_v4.5/CRM/Event/Form/Participant.php).
Notice: Trying to get property of non-object in CRM_Event_Form_Participant->postProcess() (line 1305 of /Users/dgg/git/crm_v4.5/CRM/Event/Form/Participant.php).


//add custom data for participant
CRM_Core_BAO_CustomValueTable::postProcess($this->_params,
Expand Down