Katie Horn has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/159638

Change subject: Fixes the date formatting / normalizing.
......................................................................

Fixes the date formatting / normalizing.

Was just returning false.

Change-Id: I5ddde4025c60a79c45c681b7b81d7624ae00b8ff
---
M PaymentProviders/WorldPay/Audit/TransactionReconciliationFile.php
1 file changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/38/159638/1

diff --git a/PaymentProviders/WorldPay/Audit/TransactionReconciliationFile.php 
b/PaymentProviders/WorldPay/Audit/TransactionReconciliationFile.php
index 5e373af..afe9e90 100644
--- a/PaymentProviders/WorldPay/Audit/TransactionReconciliationFile.php
+++ b/PaymentProviders/WorldPay/Audit/TransactionReconciliationFile.php
@@ -242,7 +242,13 @@
                        throw new \Exception( "Don't know how to handle 
transaction type {$record["transaction_type"]}" );
                }
 
-               $msg["date"] = strtotime( $record["transaction_date"] . 'T' . 
$record["transaction_time"] . "Z00" );
+               //ARGH.
+               //transaction_date looks like ddmmyy.
+               //@TODO: Verify that the transaction_time is in fact UTC, and 
not some other weirdo country time. 
+               $datestring = '20' . substr( $record["transaction_date"], 4, 2 
) . substr( $record["transaction_date"], 2, 2 ) . substr( 
$record["transaction_date"], 0, 2 );
+               $datestring .= ' ' . $record["transaction_time"] . '-0000';
+
+               $msg["date"] = strtotime( $datestring );
 
                $msg["gateway"] = "worldpay";
 

-- 
To view, visit https://gerrit.wikimedia.org/r/159638
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ddde4025c60a79c45c681b7b81d7624ae00b8ff
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Katie Horn <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to