Index: civicrm/trunk/sites/all/modules/wmf_owa/wmf_owa.module |
— | — | @@ -65,51 +65,17 @@ |
66 | 66 | return; |
67 | 67 | } |
68 | 68 | |
69 | | - $query_params = wmf_owa_prepare_owa_query( $contrib_tracking_data, $objectRef ); |
70 | | - |
71 | | - // send the query to OWA |
72 | | - wmf_owa_send_tracking( $query_params ); |
73 | | - return; |
74 | | - |
75 | | -} |
76 | | - |
77 | | -/** |
78 | | - * Hook implementation of queue2civicrm_import |
79 | | - * |
80 | | - * This gets called when queue2civicrm has completed importing a trxn |
81 | | - * from the queueing service. |
82 | | - * @param $contribution_id |
83 | | - */ |
84 | | -function wmf_owa_queue2civicrm_import( $contribution_id ) { |
85 | | - |
86 | | -//commenting this out for now because the contribution gets 'edited' when the thank you is sent |
87 | | -/* // load the OWA-specific tracking data |
88 | | - $contrib_tracking_data = wmf_owa_get_contribution_tracking_data( $contribution_id ); |
89 | | - if ( !$contrib_tracking_data ) { |
90 | | - // log, don't post to OWA |
91 | | - watchdog( 'wmf_owa', 'Could not load tracking data for contribution_id %objectId ', array( '%objectId' => $objectId ), WATCHDOG_WARNING ); |
92 | | - return; |
93 | | - } |
94 | | - |
95 | | - watchdog( 'wmf_owa', 'preparing toinitialize civicrm' ); |
96 | | - |
97 | | - // load the contribution object |
98 | | - civicrm_initialize(true); |
99 | | - watchdog( 'wmf_owa', 'civicrm initialized' ); |
100 | | - require_once 'api/v2/Contribute.php'; |
101 | | - $params = array( 'contribution_id' => $contribution_id ); |
| 69 | + // we'll prepare the contribution object ourselves because for some reason sometimes $objectRef isn't fully populated... |
| 70 | + $params = array( 'contribution_id' => $objectId ); |
102 | 71 | watchdog( 'wmf_owa', 'civi contribution_get params: %params', array( '%params' => print_r( $params, true )), WATCHDOG_DEBUG ); |
103 | 72 | $contribution =& civicrm_contribution_get( $params ); |
104 | 73 | |
105 | | - watchdog( 'wmf_owa', 'contribution array: %array', array( '%array' => print_r( $contribution, true )), WATCHDOG_DEBUG ); |
106 | | - watchdog( 'wmf_owa', 'contribution object: %object', array( '%object' => print_r( (object) $contribution, true )), WATCHDOG_DEBUG ); |
107 | | - |
108 | | - // note that we cast the contribution as an object so wmf_owa_prepare_owa_query can work with it correctly |
109 | 74 | $query_params = wmf_owa_prepare_owa_query( $contrib_tracking_data, (object) $contribution ); |
110 | 75 | |
111 | 76 | // send the query to OWA |
112 | | - wmf_owa_send_tracking( $query_params );*/ |
| 77 | + wmf_owa_send_tracking( $query_params ); |
113 | 78 | return; |
| 79 | + |
114 | 80 | } |
115 | 81 | |
116 | 82 | /** |
— | — | @@ -227,6 +193,5 @@ |
228 | 194 | WATCHDOG_DEBUG ); |
229 | 195 | |
230 | 196 | curl_close( $ch ); |
231 | | -// system( "wget --user-agent='WMF Ecommerce web service 1.0' '$url_with_request'" ); |
232 | 197 | return; |
233 | 198 | } |