_removeButton('edit');
$standard = Mage::getModel('epay/standard');
$this->_headerText = Mage::helper('epay')->__('Payment request');
$paymentrequest_id = $this->getRequest()->getParam('id');
$paymentRequest = Mage::getModel('epay/paymentrequest')->load($paymentrequest_id)->getData();
$soapClient = new SoapClient("https://paymentrequest.api.epay.eu/v1/PaymentRequestSOAP.svc?wsdl");
$params = array();
$params["authentication"] = array();
$params["authentication"]["merchantnumber"] = $standard->getConfigData('merchantnumber');
$params["authentication"]["password"] = $standard->getConfigData('remoteinterfacepassword');
$params["paymentrequest"] = array();
$params["paymentrequest"]["paymentrequestid"] = $paymentRequest["paymentrequestid"];
$getPaymentRequest = $soapClient->getpaymentrequest(array('getpaymentrequestrequest' => $params));
if($getPaymentRequest->getpaymentrequestResult->result)
{
$this->setPaymentrequestId($paymentRequest["paymentrequestid"]);
$this->setPaymentrequest($getPaymentRequest->getpaymentrequestResult);
}
$this->setTemplate('epay/paymentrequest/view.phtml');
}
}