/**
  * populates the payment form object from the given parameters and generates
  * the $completeHtmlFormWithSubmitButton & $htmlFormFieldsAsArray attributes
  *
  * @param type $xmlMessage
  * @param ConfigurationProvider $config
  * @param string $countryCode
  */
 function __construct($xmlMessage, $config, $countryCode = NULL)
 {
     $this->xmlMessage = $xmlMessage;
     $this->xmlMessageBase64 = base64_encode($xmlMessage);
     $this->endPointUrl = $config->getEndPoint(\ConfigurationProvider::HOSTED_TYPE);
     $this->merchantid = $config->getMerchantId(\ConfigurationProvider::HOSTED_TYPE, $countryCode);
     $this->secretWord = $config->getSecret(\ConfigurationProvider::HOSTED_TYPE, $countryCode);
     $this->mac = hash("sha512", $this->xmlMessageBase64 . $this->secretWord);
     $this->setForm();
     $this->setHtmlFields();
     $this->setRawFields();
     $this->setSubmitMessage();
 }
 /**
  * Constructor, sets up soap server and SoapClient
  * @param ConfigurationProvider $config
  * @param string $orderType -- see ConfigurationProvider:: constants
  */
 public function __construct($config, $ordertype)
 {
     $this->svea_server = $config->getEndPoint($ordertype);
     $this->client = $this->SetSoapClient($config);
 }