r86677 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86676‎ | r86677 | r86678 >
Date:22:50, 21 April 2011
Author:awjrichards
Status:deferred
Tags:
Comment:
Added a really ugly hack to format trxns function to output data to feed into the IPN log parser until we integrate it with this tool
Modified paths:
  • /civicrm/trunk/sites/all/modules/paypal_audit/paypal_audit.module (modified) (history)

Diff [purge]

Index: civicrm/trunk/sites/all/modules/paypal_audit/paypal_audit.module
@@ -146,7 +146,7 @@
147147 "@tx_id" => $pp_trxns[$pp_trxn_id][ $columns['Transaction ID']],
148148 "@pp_tx_id" => $pp_trxns[$pp_trxn_id][ $columns['PayPal Transaction ID']],
149149 "@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 );
151151 } else {
152152 watchdog( 'paypal_audit', 'Found PayPal: @id', array( "@id" => $pp_trxn_id ), WATCHDOG_DEBUG );
153153 }
@@ -193,6 +193,7 @@
194194 /**
195195 * Format transactions
196196 * @FIXME handle wonky fields (eg contribution tracking id, optout, etc)
 197+ * @FIXME get rid of the ugly hack
197198 * @TODO finish the mappings! NOTE that some transactional information
198199 * will need to be fetched out of the minfraud or other logs...
199200 * @param unknown_type $trxns
@@ -215,7 +216,11 @@
216217 $formatted_trxn['gross'] = $trxn[ $columns[ 'Amount' ]];
217218 $formatted_trxn['date'] = strtotime( $trxn[ $columns[ 'Time' ]] );
218219
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+ }
220225 }
221226
222227 return $trxns_formatted;

Status & tagging log