Commit 9ce48393 authored by jenlampton's avatar jenlampton

Make sire we get the correct cid for transaciton ID.

parent 1926c9dd
......@@ -359,7 +359,7 @@ function authorizenetwebform_webform_client_form_submit($form, &$form_state) {
foreach ($field_keys as $rkey => $remaining_key) {
// Optionally add additional custom fields, if they have values.
if (array_key_exists($remaining_key, $field_values[$field_keys) &&
if (array_key_exists($remaining_key, $field_keys) &&
!empty($field_values[$field_keys[$remaining_key]])) {
$data[$top_key][$second_key]['userFields']['userField'][] = array(
'name' => $remaining_key,
......@@ -433,8 +433,9 @@ function authorizenetwebform_webform_client_form_submit($form, &$form_state) {
// Get Transaction ID Component ID: webform field => component ID.
$node = node_load($nid);
$webform_field_name = $flipped_map['x_trans_id'];
$component_ids = _authorizenetwebform_get_component_ids($node);
$trans_cid = $component_ids[$flipped_map['x_trans_id']];
$trans_cid = $component_ids[$webform_field_name];
// Update the webform submission Transaction ID.
$form_state['values']['submitted'][$trans_cid] = $response_id;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment