MediaWiki:DonationFormSandbox.js: Difference between revisions

Content deleted Content added
No edit summary
replace deprecated mw.Uri with native URL - phab:T374314
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:
}
 
uri.extendfor ( const [key, value] of params ); {
url.searchParams.set( key, value );
}
 
if ( window.top !== window.self ) {
// In a frame, open payments in a new tab
window.open( uriurl.toString() );
} else {
window.location.href = uriurl.toString();
}
};