Index: civicrm/trunk/sites/all/modules/paypal_audit/paypal_audit.module |
— | — | @@ -146,7 +146,7 @@ |
147 | 147 | "@tx_id" => $pp_trxns[$pp_trxn_id][ $columns['Transaction ID']], |
148 | 148 | "@pp_tx_id" => $pp_trxns[$pp_trxn_id][ $columns['PayPal Transaction ID']], |
149 | 149 | "@t" => $pp_trxns[$pp_trxn_id][ $columns['Type']], |
150 | | - "@tt" => $pp_trxns[$pp_trxn_id][ $columns['Tender Type']] ), WATCHDOG_DEBUG ); |
| 150 | + "@tt" => $pp_trxns[$pp_trxn_id][ $columns['Tender Type']] ), WATCHDOG_DEBUG ); |
151 | 151 | } else { |
152 | 152 | watchdog( 'paypal_audit', 'Found PayPal: @id', array( "@id" => $pp_trxn_id ), WATCHDOG_DEBUG ); |
153 | 153 | } |
— | — | @@ -193,6 +193,7 @@ |
194 | 194 | /** |
195 | 195 | * Format transactions |
196 | 196 | * @FIXME handle wonky fields (eg contribution tracking id, optout, etc) |
| 197 | + * @FIXME get rid of the ugly hack |
197 | 198 | * @TODO finish the mappings! NOTE that some transactional information |
198 | 199 | * will need to be fetched out of the minfraud or other logs... |
199 | 200 | * @param unknown_type $trxns |
— | — | @@ -215,7 +216,11 @@ |
216 | 217 | $formatted_trxn['gross'] = $trxn[ $columns[ 'Amount' ]]; |
217 | 218 | $formatted_trxn['date'] = strtotime( $trxn[ $columns[ 'Time' ]] ); |
218 | 219 | |
219 | | - array_push( $trxns_formatted, $formatted_trxn ); |
| 220 | + array_push( $trxns_formatted, $formatted_trxn ); |
| 221 | + // this is a hack to output data in a format for the log parser not currently integrated. ugly. |
| 222 | + if ( $gateway != 'PayflowPro' && !strlen($formatted_trxn['country']) ){ |
| 223 | + print $formatted_trxn['gateway_txn_id'] . '\t' . $formatted_trxn['gross'] . "\n"; |
| 224 | + } |
220 | 225 | } |
221 | 226 | |
222 | 227 | return $trxns_formatted; |