r101232 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101231‎ | r101232 | r101233 >
Date:23:26, 28 October 2011
Author:awjrichards
Status:resolved (Comments)
Tags:
Comment:
Defaulting currency to USD
Modified paths:
  • /trunk/extensions/DonationInterface/gateway_common/DonationData.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_common/gateway.adapter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/gateway_common/gateway.adapter.php
@@ -1285,7 +1285,7 @@
12861286 $utm_source_parts[2] = 'pp';
12871287 $data['utm_source'] = implode( ".", $utm_source_parts );
12881288 $data['gateway'] = 'paypal';
1289 - $data['currency_code'] = isset( $data['currency'] ) ? $data['currency'] : '';
 1289+ $data['currency_code'] = isset( $data['currency'] ) ? $data['currency'] : 'USD';
12901290
12911291 // Add our response vars to the data object.
12921292 $this->dataObj->addData( $data );
Index: trunk/extensions/DonationInterface/gateway_common/DonationData.php
@@ -56,7 +56,7 @@
5757 'card_type' => $wgRequest->getText( 'card_type' ),
5858 'expiration' => $wgRequest->getText( 'mos' ) . substr( $wgRequest->getText( 'year' ), 2, 2 ),
5959 'cvv' => $wgRequest->getText( 'cvv' ),
60 - 'currency' => $wgRequest->getText( 'currency_code' ),
 60+ 'currency' => $wgRequest->getText( 'currency_code', 'USD' ),
6161 'payment_method' => $wgRequest->getText( 'payment_method' ),
6262 'payment_submethod' => $wgRequest->getText( 'payment_submethod', null ), // Used by GlobalCollect for payment types
6363 'issuer_id' => $wgRequest->getText( 'issuer_id' ),

Follow-up revisions

RevisionCommit summaryAuthorDate
r101233MFT r101230, r101232awjrichards23:27, 28 October 2011

Comments

#Comment by Khorn (WMF) (talk | contribs)   21:56, 5 November 2011

This was all solved a bit differently in ways that eventually resulted in r102011.

Status & tagging log