/** * Return request object with basic information for gateway request * * @return \Magento\Paypal\Model\Payflow\Request */ public function buildBasicRequest() { /** @var \Magento\Paypal\Model\Payflow\Request $request */ $request = $this->_requestFactory->create(); $cscEditable = $this->getConfigData('csc_editable'); $data = parent::buildBasicRequest(); $request->setData($data->getData()); $request->setCancelurl($this->_getCallbackUrl('cancelPayment'))->setErrorurl($this->_getCallbackUrl('returnUrl'))->setSilentpost('TRUE')->setSilentposturl($this->_getCallbackUrl('silentPost'))->setReturnurl($this->_getCallbackUrl('returnUrl'))->setTemplate(self::LAYOUT_TEMPLATE)->setDisablereceipt('TRUE')->setCscrequired($cscEditable && $this->getConfigData('csc_required') ? 'TRUE' : 'FALSE')->setCscedit($cscEditable ? 'TRUE' : 'FALSE')->setEmailcustomer($this->getConfigData('email_confirmation') ? 'TRUE' : 'FALSE')->setUrlmethod($this->getConfigData('url_method')); return $request; }
/** * Return request object with basic information for gateway request * * @param \Magento\Framework\Object $payment * @return \Magento\Paypal\Model\Payflow\Request */ protected function _buildBasicRequest(\Magento\Framework\Object $payment) { /** @var \Magento\Paypal\Model\Payflow\Request $request */ $request = $this->_requestFactory->create(); $cscEditable = $this->getConfigData('csc_editable'); /** @var \Magento\Paypal\Model\Config $config */ $config = $this->_configFactory->create(); $request->setUser($this->getConfigData('user', $this->_getStoreId()))->setVendor($this->getConfigData('vendor', $this->_getStoreId()))->setPartner($this->getConfigData('partner', $this->_getStoreId()))->setPwd($this->getConfigData('pwd', $this->_getStoreId()))->setVerbosity($this->getConfigData('verbosity', $this->_getStoreId()))->setData('BNCODE', $config->getBuildNotationCode())->setTender(self::TENDER_CC)->setCancelurl($this->_getCallbackUrl('cancelPayment'))->setErrorurl($this->_getCallbackUrl('returnUrl'))->setSilentpost('TRUE')->setSilentposturl($this->_getCallbackUrl('silentPost'))->setReturnurl($this->_getCallbackUrl('returnUrl'))->setTemplate(self::LAYOUT_TEMPLATE)->setDisablereceipt('TRUE')->setCscrequired($cscEditable && $this->getConfigData('csc_required') ? 'TRUE' : 'FALSE')->setCscedit($cscEditable ? 'TRUE' : 'FALSE')->setEmailcustomer($this->getConfigData('email_confirmation') ? 'TRUE' : 'FALSE')->setUrlmethod($this->getConfigData('url_method')); return $request; }