MediaWiki:DonationForm.js: Difference between revisions

Content deleted Content added
m convert spacing to tabs
replace deprecated mw.Uri with native URL - phab:T374314
Line 255:
{}
)
};
 
// currencyDisplay: 'narrowSymbol' fixes some issues like en-CO showing the ISO code
Line 864:
donationForm.finalStep = function( params ) {
 
var uriurl = new mw.UriURL('https://payments.wikimedia.org/index.php/Special:GatewayChooser');
 
// Skip form chooser for Apple Pay / Google Pay
if ( params.payment_method === 'apple' || params.payment_method === 'google' ) {
uriurl = new mw.UriURL('https://payments.wikimedia.org/index.php/Special:AdyenCheckoutGateway');
}
 
// Skip form chooser for Venmo
if ( params.payment_method === 'venmo' ) {
uriurl = new mw.UriURL('https://payments.wikimedia.org/index.php/Special:BraintreeGateway');
}
 
Line 888:
}
 
urifor ( var key of Object.extendkeys( params ); ) {
url.searchParams.set( key, params[key] );
}
 
if ( window.top !== window.self ) {
// In a frame, open payments in a new tab
window.open( uriurl.toString() );
} else {
window.location.href = uriurl.toString();
}
};