Ejegg has uploaded a new change for review.
https://gerrit.wikimedia.org/r/246391
Change subject: Fix refund IDs to get rid of duplicate RFD
......................................................................
Fix refund IDs to get rid of duplicate RFD
Set refund_id, not transaction_id
Don't prepend 'RFD ' to refund_id - WmfTransaction::get_unique_id
already does that for us.
Bug: T115511
Change-Id: I56cdc4a2767bcaf17b8fe43bba13ac97c610f31b
---
M PaymentProviders/Amazon/Audit/RefundReport.php
M PaymentProviders/Amazon/Tests/phpunit/AuditTest.php
M PaymentProviders/AstroPay/Audit/AstroPayAudit.php
M PaymentProviders/AstroPay/Tests/phpunit/AuditTest.php
4 files changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig
refs/changes/91/246391/1
diff --git a/PaymentProviders/Amazon/Audit/RefundReport.php
b/PaymentProviders/Amazon/Audit/RefundReport.php
index 797ff54..614eca0 100644
--- a/PaymentProviders/Amazon/Audit/RefundReport.php
+++ b/PaymentProviders/Amazon/Audit/RefundReport.php
@@ -48,7 +48,7 @@
);
$msg['gateway'] = 'amazon';
$msg['gateway_parent_id'] = $csv->currentCol( 'AmazonCaptureId'
);
- $msg['gateway_txn_id'] = $csv->currentCol( 'AmazonRefundId' );
+ $msg['gateway_refund_id'] = $csv->currentCol( 'AmazonRefundId'
);
$msg['gross'] = $csv->currentCol( 'RefundAmount' );
$msg['gross_currency'] = $csv->currentCol( 'CurrencyCode' );
if ( $csv->currentCol( 'RefundType' ) === 'SellerInitiated' ) {
diff --git a/PaymentProviders/Amazon/Tests/phpunit/AuditTest.php
b/PaymentProviders/Amazon/Tests/phpunit/AuditTest.php
index 7531250..0c5e16d 100644
--- a/PaymentProviders/Amazon/Tests/phpunit/AuditTest.php
+++ b/PaymentProviders/Amazon/Tests/phpunit/AuditTest.php
@@ -56,7 +56,7 @@
'gateway_parent_id' => 'P01-4968629-7654321-C070794',
'gross_currency' => 'USD',
'type' => 'refund',
- 'gateway_txn_id' => 'P01-4968629-7654321-R017571',
+ 'gateway_refund_id' => 'P01-4968629-7654321-R017571',
);
$this->assertEquals( $expected, $actual, 'Did not parse refund
correctly' );
}
@@ -75,7 +75,7 @@
'gross' => '1.00',
'gateway_parent_id' => 'P01-4968629-2345678-C070794',
'gross_currency' => 'USD',
- 'gateway_txn_id' => 'P01-4968629-2345678-R017571',
+ 'gateway_refund_id' => 'P01-4968629-2345678-R017571',
'type' => 'chargeback',
);
$this->assertEquals( $expected, $actual, 'Did not parse
chargeback correctly' );
diff --git a/PaymentProviders/AstroPay/Audit/AstroPayAudit.php
b/PaymentProviders/AstroPay/Audit/AstroPayAudit.php
index fcf46fc..6288a86 100644
--- a/PaymentProviders/AstroPay/Audit/AstroPayAudit.php
+++ b/PaymentProviders/AstroPay/Audit/AstroPayAudit.php
@@ -97,7 +97,7 @@
protected function parseRefund( array $row, array &$msg ) {
$msg['contribution_tracking_id'] =
$this->getContributionTrackingId( $row['Transaction Invoice'] );
$msg['gateway_parent_id'] = $row['Transaction Reference'];
- $msg['gateway_refund_id'] = 'RFD ' . $row['Reference'];
+ $msg['gateway_refund_id'] = $row['Reference'];
$msg['gross_currency'] = $row['currency'];
$msg['log_id'] = $row['Transaction Invoice'];
$msg['type'] = strtolower( $row['Type'] );
diff --git a/PaymentProviders/AstroPay/Tests/phpunit/AuditTest.php
b/PaymentProviders/AstroPay/Tests/phpunit/AuditTest.php
index 9eeed82..229050b 100644
--- a/PaymentProviders/AstroPay/Tests/phpunit/AuditTest.php
+++ b/PaymentProviders/AstroPay/Tests/phpunit/AuditTest.php
@@ -48,7 +48,7 @@
'date' => 1434747909,
'gross' => '5.00',
'gateway_parent_id' => '7654321',
- 'gateway_refund_id' => 'RFD 12345',
+ 'gateway_refund_id' => '12345',
'gross_currency' => 'BRL',
'log_id' => '314159265.0',
'type' => 'refund',
@@ -70,7 +70,7 @@
'date' => 1434747909,
'gross' => '5.00',
'gateway_parent_id' => '7654321',
- 'gateway_refund_id' => 'RFD 12345',
+ 'gateway_refund_id' => '12345',
'gross_currency' => 'BRL',
'log_id' => '314159265.0',
'type' => 'chargeback',
--
To view, visit https://gerrit.wikimedia.org/r/246391
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I56cdc4a2767bcaf17b8fe43bba13ac97c610f31b
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits