/** * Log debug data to file * * @return void */ protected function _debug() { if ($this->_config && $this->_config->getConfigValue('debug')) { $file = $this->_config->getMethodCode() ? "payment_{$this->_config->getMethodCode()}.log" : self::DEFAULT_LOG_FILE; $this->_logAdapterFactory->create(array('fileName' => $file))->log($this->_debugData); } }
/** * Aggregated cart summary label getter * * @return string */ private function _getAggregatedCartSummary() { if ($this->_config->getConfigValue('lineItemsSummary')) { return $this->_config->getConfigValue('lineItemsSummary'); } return $this->_storeManager->getStore($this->getStore())->getFrontendName(); }
public function testGetSpecificConfigPathPayflow() { // _mapBmlPayflowFieldset $this->_model->setMethod(Config::METHOD_WPP_PE_BML); $this->_scopeConfig->expects($this->once())->method('getValue')->with('payment/' . Config::METHOD_WPP_PE_EXPRESS . '/allow_ba_signup')->will($this->returnValue(1)); $this->assertEquals(1, $this->_model->getConfigValue('allow_ba_signup')); }
/** * Set create billing agreement flag to api call * * @return $this */ protected function _setBillingAgreementRequest() { if (!$this->_customerId || $this->_quote->hasNominalItems()) { return $this; } $isRequested = $this->_isBARequested || $this->_quote->getPayment()->getAdditionalInformation(self::PAYMENT_INFO_TRANSPORT_BILLING_AGREEMENT); if (!($this->_config->getConfigValue('allow_ba_signup') == PaypalConfig::EC_BA_SIGNUP_AUTO || $isRequested && $this->_config->shouldAskToCreateBillingAgreement())) { return $this; } if (!$this->_agreementFactory->create()->needToCreateForCustomer($this->_customerId)) { return $this; } $this->_api->setBillingType($this->_api->getBillingAgreementType()); return $this; }
/** * Check whether API certificate authentication should be used * * @return bool */ public function getUseCertAuthentication() { return (bool) $this->_config->getConfigValue('apiAuthentication'); }