protected function fillTransaction(SimpleXMLElement $xml) { $hpsPopulator = new HpsTxnPopulator(); $hpsPopulator->setReturnUrl($this->getReturnUrl())->setExpiryUrl($this->getExpiryUrl())->setErrorUrl($this->errorUrl)->setPageSetId($this->getPageSetId())->setMethod(SetupMethod::FULL); $detailsPopulator = new TxnDetailsWithoutRiskPopulator(); $detailsPopulator->setReference($this->getReference())->setAmount($this->getAmount())->setCaptureMethod(CaptureMethod::ECOMM)->setMerchantUrl($this->merchantUrl)->setDescription($this->description); $hpsPopulator->createElement($xml->addChild('HpsTxn')); $detailsPopulator->createElement($xml->addChild('TxnDetails')); $cardTxn = $xml->addChild('CardTxn'); $cardTxn->addChild('method', 'auth'); }
public function innerCreateElement(SimpleXMLElement $xml) { parent::__construct(); $xml->addChild('capturemethod', CaptureMethod::ECOMM); $this->riskPopulator->createElement($xml->addChild('Risk')); }