MediaWiki fundraising/REL1_35
braintree_gateway.body.php
Go to the documentation of this file.
1<?php
2
9
11
12 protected function addGatewaySpecificResources( OutputPage $out ): void {
13 $clientScript = $this->adapter->getAccountConfig( 'clientScript' );
14 $paypalScript = $this->adapter->getAccountConfig( 'paypalScript' );
15 $deviceScript = $this->adapter->getAccountConfig( 'deviceScript' );
16 $out->addScript( "<script src=\"{$clientScript}\"></script>" );
17 $out->addScript( "<script src=\"{$paypalScript}\"></script>" );
18 $out->addScript( "<script src=\"{$deviceScript}\"></script>" );
19 }
20
21 public function setClientVariables( &$vars ) {
22 parent::setClientVariables( $vars );
23 $failPage = GatewayChooser::buildGatewayPageUrl(
24 'braintree',
25 [ 'showError' => true ],
26 $this->getConfig()
27 );
28
29 $vars['DonationInterfaceFailUrl'] = $failPage;
30 $vars['clientToken'] = $this->adapter->getClientToken();
31 $vars['DonationInterfaceThankYouPage'] = ResultPages::getThankYouPage( $this->adapter );
32 }
33
41 public function showContinueButton() {
42 return false;
43 }
44}
setClientVariables(&$vars)
MakeGlobalVariablesScript handler, sends settings to Javascript.
showContinueButton()
Overrides parent function to return false.
addGatewaySpecificResources(OutputPage $out)
Override this to add any gateway-specific scripts or stylesheets that can't be loaded via ResourceLoa...
GatewayPage This class is the generic unlisted special page in charge of actually displaying the form...
This is one of the Core classes and should be read at least once by any new developers.
addScript( $script)
Add raw HTML to the list of scripts (including <script> tag, etc.) Internal use only.
static getThankYouPage(GatewayType $adapter, $extraParams=[])
Get the URL for a page to show donors after a successful donation, with the country code appended as ...