jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/383283 )
Change subject: Add contact_id and _hash to the rest of the places
......................................................................
Add contact_id and _hash to the rest of the places
Need to at least store them in session. Putting the stuff in the
hidden fields too, to keep them across session death to the extent
we keep anything.
Bug: T177663
Change-Id: Ide99711deddc569ea83cafbdad808533e2e9e0a0
---
M gateway_common/DonationData.php
M gateway_common/donation.api.php
M gateway_common/i18n/interface/en.json
M gateway_common/i18n/interface/qqq.json
M gateway_forms/mustache/index.html.mustache
M modules/js/ext.donationInterface.forms.js
6 files changed, 12 insertions(+), 0 deletions(-)
Approvals:
Mepps: Looks good to me, but someone else must approve
XenoRyet: Looks good to me, approved
jenkins-bot: Verified
diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php
index 2673df7..3653241 100644
--- a/gateway_common/DonationData.php
+++ b/gateway_common/DonationData.php
@@ -979,6 +979,8 @@
$fields[] = 'order_id';
$fields[] = 'appeal';
$fields[] = 'referrer';
+ $fields[] = 'contact_id';
+ $fields[] = 'contact_hash';
return $fields;
}
diff --git a/gateway_common/donation.api.php b/gateway_common/donation.api.php
index f488033..5703a5c 100644
--- a/gateway_common/donation.api.php
+++ b/gateway_common/donation.api.php
@@ -131,6 +131,8 @@
public function getAllowedParams() {
return array(
'gateway' => $this->defineParam( true ),
+ 'contact_id' => $this->defineParam( false ),
+ 'contact_hash' => $this->defineParam( false ),
'amount' => $this->defineParam( false ),
'currency' => $this->defineParam( false ),
'first_name' => $this->defineParam( false ),
diff --git a/gateway_common/i18n/interface/en.json
b/gateway_common/i18n/interface/en.json
index 1f3f453..999cfdd 100644
--- a/gateway_common/i18n/interface/en.json
+++ b/gateway_common/i18n/interface/en.json
@@ -431,6 +431,8 @@
"apihelp-donate-summary": "This API allow you to submit a donation to
the Wikimedia Foundation using a variety of payment processors.",
"apihelp-donate-param-gateway": "Which payment gateway to use - adyen,
globalcollect, etc.",
"apihelp-donate-param-amount": "The amount donated.",
+ "apihelp-donate-param-contact_id": "ID of the donor in CiviCRM.",
+ "apihelp-donate-param-contact_hash": "Hash of the donor in CiviCRM,
used for verification. Mandatory when contact_id is given.",
"apihelp-donate-param-currency": "Currency code.",
"apihelp-donate-param-first_name": "First name.",
"apihelp-donate-param-last_name": "Last name.",
diff --git a/gateway_common/i18n/interface/qqq.json
b/gateway_common/i18n/interface/qqq.json
index 61e7711..4bc4835 100644
--- a/gateway_common/i18n/interface/qqq.json
+++ b/gateway_common/i18n/interface/qqq.json
@@ -456,6 +456,8 @@
"apihelp-donate-summary": "{{doc-apihelp-summary|donate}}",
"apihelp-donate-param-gateway": "{{doc-apihelp-param|donate|gateway}}",
"apihelp-donate-param-amount": "{{doc-apihelp-param|donate|amount}}",
+ "apihelp-donate-param-contact_id":
"{{doc-apihelp-param|donate|contact_id}}",
+ "apihelp-donate-param-contact_hash":
"{{doc-apihelp-param|donate|contact_hash}}",
"apihelp-donate-param-currency":
"{{doc-apihelp-param|donate|currency}}",
"apihelp-donate-param-first_name":
"{{doc-apihelp-param|donate|first_name}}\n{{Identical|First name}}",
"apihelp-donate-param-last_name":
"{{doc-apihelp-param|donate|last_name}}\n{{Identical|Last name}}",
diff --git a/gateway_forms/mustache/index.html.mustache
b/gateway_forms/mustache/index.html.mustache
index cc794a3..b8ca5fe 100644
--- a/gateway_forms/mustache/index.html.mustache
+++ b/gateway_forms/mustache/index.html.mustache
@@ -43,6 +43,8 @@
</div>
<input type="hidden" value="{{ country }}"
name="country" id="country" />
<input type="hidden" value="{{ expiration }}"
name="expiration" id="expiration"/>
+ <input type="hidden" value="{{ contact_id }}"
name="contact_id" id="contact_id"/>
+ <input type="hidden" value="{{ contact_hash }}"
name="contact_hash" id="contact_hash"/>
<input type="hidden" value="{{ utm_source }}"
name="utm_source" id="utm_source"/>
<input type="hidden" value="{{ utm_medium }}"
name="utm_medium" id="utm_medium"/>
<input type="hidden" value="{{ utm_campaign }}"
name="utm_campaign" id="utm_campaign"/>
diff --git a/modules/js/ext.donationInterface.forms.js
b/modules/js/ext.donationInterface.forms.js
index f11019c..88ae071 100644
--- a/modules/js/ext.donationInterface.forms.js
+++ b/modules/js/ext.donationInterface.forms.js
@@ -45,6 +45,8 @@
var sendData = {
action: 'donate',
gateway: $( '#gateway' ).val(),
+ contact_id: $( '#contact_id' ).val(),
+ contact_hash: $( '#contact_hash' ).val(),
currency: $( '#currency' ).val(),
amount: $( '#amount' ).val(),
first_name: $( '#first_name' ).val(),
--
To view, visit https://gerrit.wikimedia.org/r/383283
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ide99711deddc569ea83cafbdad808533e2e9e0a0
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>
Gerrit-Reviewer: AndyRussG <[email protected]>
Gerrit-Reviewer: Mepps <[email protected]>
Gerrit-Reviewer: XenoRyet <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits