Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/332970 )
Change subject: Fold getRetryData into mustache error form ...................................................................... Fold getRetryData into mustache error form No need to have it on the gateway interface if the form already has the donation data. Change-Id: If82e4d9cbe0404aa65492120015a6ab26b3fa4bc --- M gateway_common/GatewayType.php M gateway_common/gateway.adapter.php M gateway_forms/MustacheErrorForm.php 3 files changed, 3 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/70/332970/1 diff --git a/gateway_common/GatewayType.php b/gateway_common/GatewayType.php index 8c93558..c31e840 100644 --- a/gateway_common/GatewayType.php +++ b/gateway_common/GatewayType.php @@ -223,14 +223,6 @@ public function getData_Unstaged_Escaped( $val = '' ); /** - * Retrieve the data we will need in order to retry a payment. - * This is useful in the event that we have just killed a session before - * the next retry. - * @return array Data required for a payment retry. - */ - public function getRetryData(); - - /** * Get metadata for the specified payment method as set in * @see definePaymentMethods * diff --git a/gateway_common/gateway.adapter.php b/gateway_common/gateway.adapter.php index d7754ab..74fbe5f 100644 --- a/gateway_common/gateway.adapter.php +++ b/gateway_common/gateway.adapter.php @@ -3175,14 +3175,6 @@ return $match; } - public function getRetryData() { - $params = array ( ); - foreach ( $this->dataObj->getRetryFields() as $field ) { - $params[$field] = $this->getData_Unstaged_Escaped( $field ); - } - return $params; - } - /** * buildOrderIDSources: Uses the 'alt_locations' array in the order id * metadata, to build an array of all possible candidates for order_id. diff --git a/gateway_forms/MustacheErrorForm.php b/gateway_forms/MustacheErrorForm.php index 9e633c7..434f9b3 100644 --- a/gateway_forms/MustacheErrorForm.php +++ b/gateway_forms/MustacheErrorForm.php @@ -36,8 +36,9 @@ 'gateway' => $this->gateway->getIdentifier() ); if ( !$this->gateway->session_hasDonorData() ) { - $preserve = $this->gateway->getRetryData(); - $params = array_merge( $preserve, $params ); + foreach ( DonationData::getRetryFields() as $field ) { + $params[$field] = $data[$field]; + } } $data['ffname_retry'] = GatewayFormChooser::buildPaymentsFormURL( $back_form, $params ) ; } -- To view, visit https://gerrit.wikimedia.org/r/332970 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If82e4d9cbe0404aa65492120015a6ab26b3fa4bc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Ejegg <eeggles...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits