Ejegg has uploaded a new change for review.
https://gerrit.wikimedia.org/r/186391
Change subject: Add another freaky Alipay audit exception
......................................................................
Add another freaky Alipay audit exception
Some Alipay orders are coming in with method and product IDs
indicating bank transfer, but method 'PP'.
Change-Id: I1eda5d745a2b49feb8c6bcca889d535fa6948c98
---
M sites/all/modules/globalcollect_audit/globalcollect_audit.module
1 file changed, 12 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm
refs/changes/91/186391/1
diff --git a/sites/all/modules/globalcollect_audit/globalcollect_audit.module
b/sites/all/modules/globalcollect_audit/globalcollect_audit.module
index fc0d547..b61f756 100644
--- a/sites/all/modules/globalcollect_audit/globalcollect_audit.module
+++ b/sites/all/modules/globalcollect_audit/globalcollect_audit.module
@@ -1940,11 +1940,20 @@
function gca_wr1_key_grinder( $record, $keys, $name, $error_on_mismatch =
false ){
$ret = null;
+ // Sometime GC indicates Alipay as Ewallet / Alipay, and sometimes as
+ // bank transfer/bank transfer, but with Payment-method 'PP'. Yecch.
+ $is_alipay = (
+ $record['WbC Payment method ID'] === '8'
+ && $record['WbC Payment product ID'] === '861'
+ ) || (
+ $record['WbC Payment method ID'] === '7'
+ && $record['WbC Payment product ID'] === '11'
+ && $record['Payment-method'] === 'PP'
+ );
+
//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 ( $is_alipay && in_array( $name, array( 'currency', 'amount' ) ) ){
if ( $name === 'currency' ) {
$ret = $record['Invoice-currency-deliv'];
--
To view, visit https://gerrit.wikimedia.org/r/186391
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1eda5d745a2b49feb8c6bcca889d535fa6948c98
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits