Awight has uploaded a new change for review.
https://gerrit.wikimedia.org/r/281871
Change subject: WIP issuer patch
......................................................................
WIP issuer patch
Change-Id: I6cd28866379df29a727fa2680edf9b79b4614bfe
---
M gateway_common/gateway.adapter.php
M globalcollect_gateway/config/payment_methods.yaml
M globalcollect_gateway/globalcollect.adapter.php
3 files changed, 9 insertions(+), 10 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface
refs/changes/71/281871/1
diff --git a/gateway_common/gateway.adapter.php
b/gateway_common/gateway.adapter.php
index 6324311..86f230f 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -2411,6 +2411,9 @@
case 'fiscal_number' :
$check_not_empty = array(
'fiscal_number' );
break;
+ case 'issuer':
+ $check_not_empty = array( 'issuer' );
+ break;
default:
$this->logger->error( "bad required
group name: {$type}" );
continue;
diff --git a/globalcollect_gateway/config/payment_methods.yaml
b/globalcollect_gateway/config/payment_methods.yaml
index daab320..e4e2ccb 100644
--- a/globalcollect_gateway/config/payment_methods.yaml
+++ b/globalcollect_gateway/config/payment_methods.yaml
@@ -28,6 +28,8 @@
short_circuit_at: first_iop
additional_success_status:
- 20
+ validation:
+ issuer: true
cash:
label: 'Cash payments'
short_circuit_at: first_iop
diff --git a/globalcollect_gateway/globalcollect.adapter.php
b/globalcollect_gateway/globalcollect.adapter.php
index 802c039..6ab09bb 100644
--- a/globalcollect_gateway/globalcollect.adapter.php
+++ b/globalcollect_gateway/globalcollect.adapter.php
@@ -38,16 +38,6 @@
return 'Gateway_Form_RapidHtml';
}
- public function getRequiredFields() {
- $fields = parent::getRequiredFields();
- if ( $this->isMustache() ) {
- $fields[] = 'fname';
- $fields[] = 'email';
- $fields[] = 'issuer';
- }
- return $fields;
- }
-
/**
* Add a key to the transaction INSERT_ORDERWITHPAYMENT.
*
@@ -594,6 +584,10 @@
}
}
+ /**
+ * TODO: This is a transitional function to let us know which forms are
+ * implemented as Mustache. We'll eventually complete the migration.
+ */
public function isMustache () {
return in_array(
$this->getData_Unstaged_Escaped( 'ffname' ),
--
To view, visit https://gerrit.wikimedia.org/r/281871
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6cd28866379df29a727fa2680edf9b79b4614bfe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits