/** * Queue a message with the banner history ID sent on the URL, the * contribution tracking ID from DonationData, and some additional data. */ protected function queueAssociationOfIds() { $this->logger->debug('BannerHistoryLogIdProcessor::queueAssociationOfIds(): will ' . 'push to banner-history queue if required info is available.'); $bannerHistoryId = WmfFramework::getRequestValue(self::BANNER_HISTORY_LOG_ID_PARAM, null); // Campaigns may not have banner history enabled. For now, at least, // bow out silently if no banner history ID was sent. if (!$bannerHistoryId) { return; } $contributionTrackingId = $this->gatewayAdapter->getData_Unstaged_Escaped('contribution_tracking_id'); if (!$contributionTrackingId) { $this->logger->info('No contribution tracking ID for ' . 'banner-history queue ' . $bannerHistoryId . '.'); return; } $data = array('freeform' => true, 'banner_history_id' => $bannerHistoryId, 'contribution_tracking_id' => $contributionTrackingId); $this->logger->info('Pushing to banner-history queue.'); DonationQueue::instance()->push($data, 'banner-history'); }
/** * Get the URL for a page to show donors who cancel their attempt * @param GatewayType $adapter instance to use for logger and settings * @return string full URL of the cancel page */ public static function getCancelPage(GatewayType $adapter) { $cancelPage = $adapter->getGlobal('CancelPage'); if (empty($cancelPage)) { return ''; } return self::appendLanguageAndMakeURL($cancelPage, $adapter->getData_Unstaged_Escaped('language')); }