Katie Horn has submitted this change and it was merged.
Change subject: Add hokey Alipay special treatment in audit
......................................................................
Add hokey Alipay special treatment in audit
Alipay can accept currency in CNY and pay out in EUR/USD, which
looks funky on the audit. This commit short-circuits key grinding
for Alipay and uses Invoice-currency-deliv and Invoice-amount-deliv
Change-Id: I1fb6a082a5400913f2824123f4f7a9e6e1f6b190
---
M sites/all/modules/globalcollect_audit/globalcollect_audit.module
1 file changed, 15 insertions(+), 1 deletion(-)
Approvals:
Katie Horn: Looks good to me, approved
diff --git a/sites/all/modules/globalcollect_audit/globalcollect_audit.module
b/sites/all/modules/globalcollect_audit/globalcollect_audit.module
index c623cc8..e788613 100644
--- a/sites/all/modules/globalcollect_audit/globalcollect_audit.module
+++ b/sites/all/modules/globalcollect_audit/globalcollect_audit.module
@@ -1927,9 +1927,23 @@
}
function gca_wr1_key_grinder( $record, $keys, $name, $error_on_mismatch =
false ){
+ $ret = null;
+ //Alipay charges in CNY and pays out in EUR
+ //short-circuit both currency and amount for them
+ if ( $record['WbC Payment method ID'] === '8'
+ && $record['WbC Payment product ID'] === '861'
+ && in_array( $name, array( 'currency', 'amount' ) ) ){
+
+ if ( $name === 'currency' ) {
+ $ret = $record['Invoice-currency-deliv'];
+ } else {
+ $ret = $record['Invoice-amount-deliv'];
+ }
+ globalcollect_audit_echo("Alipay exception: setting $name to
$ret");
+ return $ret;
+ }
if ( $error_on_mismatch ){
- $ret = null;
$first = '';
foreach ( $keys as $key ){
if (array_key_exists( $key, $record )){
--
To view, visit https://gerrit.wikimedia.org/r/183895
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1fb6a082a5400913f2824123f4f7a9e6e1f6b190
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Katie Horn <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits