User:AGreen (WMF)/Draft:Adyen Classic and Checkout Integrations

Checkout process
Overview documentation

Rough notes

 * Entry point: Special:AdyenCheckoutGateway sends us to AdyenCheckoutGateway::execute, configured in SpecialPages section of extension.json.
 * URL has parameters that determine recurring and method (cc vs. rtbt).
 * General setup in parent method GatewayPage::execute
 * language setup
 * check for maintenance mode
 * find gateway identifier (adyen), as set in AdyenCheckoutGateway::gatewayIdentifier, taken from constant AdyenCheckoutAdapter::IDENTIFIER
 * use gateway identifier and $wgDonationInterfaceGatewayAdapters to get name of adapter class (AdyenCheckoutAdapter), default set in extension.json, ca be overridden in LocalSettings.php.
 * also use gateway identifier to set up SmashPig via DonationInterface::setSmashPigProvider, which gets config information from adyen/main.yaml in provider directory and in defaults in source code.
 * determine variant from URL or session
 * instantiate gateway adapter, sending in variant, if there is one
 * set up gateway config based on gateway identifier and global config variables, including AdyenCheckoutAdapter::GLOBAL_PREFIX, which is wgAdyenCheckoutGateway.
 * set up order_id_meta, hardcoded settings provided in AdyenCheckoutAdapter::defineOrderIDMeta
 * set up data_constraints (such as max field lengths and allowed contents) from config (may not exist, none currently for Adyen)
 * set up payment_methods and payment_submethods based on config
 * set up and instantiate data_transformers based on config