Awight has uploaded a new change for review.

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

Change subject: Tweak normalized field names
......................................................................

Tweak normalized field names

Following 
https://wikitech.wikimedia.org/wiki/Fundraising/Normalized_donation_messages

Change-Id: I1c32dd19eba992dfe8c952f1c217a943875dd75d
---
M PaymentProviders/PayPal/Job.php
M SmashPig.yaml
2 files changed, 11 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/23/311923/1

diff --git a/PaymentProviders/PayPal/Job.php b/PaymentProviders/PayPal/Job.php
index 00848e0..703f905 100644
--- a/PaymentProviders/PayPal/Job.php
+++ b/PaymentProviders/PayPal/Job.php
@@ -57,6 +57,11 @@
                                        $new_msg->$tx = $request[$rx];
                                }
                        }
+
+                       // FIXME represent special case as var_map config 
override?
+                       if ( $msg_type === 'refund' ) {
+                               $new_msg->gateway_refund_id = 
$request['txn_id'];
+                       }
                }
 
                // hax
diff --git a/SmashPig.yaml b/SmashPig.yaml
index fedca6a..a387e9b 100644
--- a/SmashPig.yaml
+++ b/SmashPig.yaml
@@ -378,8 +378,10 @@
         txn_type: txn_type
         payment_status: payment_status
         parent_txn_id: gateway_parent_id
-        txn_id: gateway_refund_id
-        mc_currency: gross_currency
+        txn_id: gateway_txn_id
+        # FIXME: This is only true for refund messages.  How to represent?
+        #txn_id: gateway_refund_id
+        mc_currency: currency
         reason_code: type
         test_ipn:  # signals test mode
         custom: contribution_tracking_id
@@ -427,6 +429,8 @@
         refund:
             txn_types:
                 - refund
+                # FIXME: if case_type=chargeback, then txn_type might be blank
+                # and the message should go to the refund queue.
 
 globalcollect:
     actions:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c32dd19eba992dfe8c952f1c217a943875dd75d
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Awight <awi...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to