jenkins-bot has submitted this change and it was merged.
Change subject: (FR #1995) Fix bad renormalization of recurring
......................................................................
(FR #1995) Fix bad renormalization of recurring
We normalize donation data three times (TODO: stop that), and on
the third time through, we would set the recurring field to false,
because boolean true was not normalized correctly.
Change-Id: I98a557b69c896d30114cb35576883d09f5c98686
---
M gateway_common/DonationData.php
1 file changed, 4 insertions(+), 2 deletions(-)
Approvals:
Ejegg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php
index 26807d4..04c4ab5 100644
--- a/gateway_common/DonationData.php
+++ b/gateway_common/DonationData.php
@@ -552,7 +552,8 @@
$this->setVal( 'recurring', true );
$this->expunge('recurring_paypal');
}
- if ( $this->isSomething( 'recurring' ) && ( $this->getVal(
'recurring' ) === '1' || $this->getVal( 'recurring' ) === 'true' ) ) {
+ if ( $this->isSomething( 'recurring' ) && ( $this->getVal(
'recurring' ) === '1' || $this->getVal( 'recurring' ) === 'true' ||
$this->getVal( 'recurring' ) === true )
+ ) {
$this->setVal( 'recurring', true );
}
else{
@@ -796,7 +797,8 @@
$this->getVal( 'recurring' )
);
- $this->log( "Setting utm_source payment method to
{$payment_method_family}", LOG_INFO );
+ $recurring = ($this->getVal( 'recurring' ) ? 'true' : 'false');
+ $this->log( "Payment method is {$this->getVal( 'payment_method'
)}, recurring = {$recurring}, utm_source = {$payment_method_family}", LOG_INFO
);
// split the utm_source into its parts for easier manipulation
$source_parts = explode( ".", $utm_source );
--
To view, visit https://gerrit.wikimedia.org/r/162173
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I98a557b69c896d30114cb35576883d09f5c98686
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Katie Horn <[email protected]>
Gerrit-Reviewer: Ssmith <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits