<?php
/*=======================================================================
 *
 * auto_response_job_new_lieferfactory.php
 *
 * CUSTOMER: LieferFactory
 *
  =======================================================================*/


// Special implementation for customer
function sendResponse($stateEvent, $timestamp, $jbId, $trId, $trSort, $tr1CommissionNo = "", $crId = "", $crSid, $trSignName, $trSign, $gdc_01 = "", $gdc_02 = "", $gdc_03 = "", $gdc_04 = "", $gdc_05 = "") {
  global $server, $port;

  $isProductive = true;

  // "https://api-qa.boxture.com/shipments/"            (Test system)
  // "https://time-matters.boxture.com/shipments/"      (Live system ???)
  // "https://api.boxture.com"                          (Live system)
  // $server = "https://api.boxture.com/shipments/";    (Live system)
  
  // $server = "https://api-qa.liefery.com/shipments/"; (Test system)
  // $server = "https://api.liefery.com/shipments/";    (Live system up to 2014-11-14 17:00:00)
  $server = "https://www.liefery.com/api/courier_company/v1/shipments/";

  // Different servers for differenz stateEvents
  if ($stateEvent == "0" || $stateEvent == "1") :
     if ($isProductive) :
        $server = "https://www.liefery.com/api/courier_company/v1/shipments/";  // Productive
     else :
        $server = "https://staging.liefery.com/api/courier_company/v1/shipments/";  // Test
     endif;
     $numOfStations = getCountOfTable("tour", "jb_id = '" . $jbId . "'");
     if ($numOfStations != "" && is_numeric($numOfStations) && $numOfStations >= 3) :
        if ($isProductive) :
           $server = "https://www.liefery.com/api/courier_company/v1/tours/";  // Productive
        else :
           $server = "https://staging.liefery.com/api/courier_company/v1/tours/";  // Test
        endif;
     endif;
  elseif ($stateEvent == "2") :
     if ($isProductive) :
        $server = "https://www.liefery.com/api/courier_company/v1/shipments/";  // Productive
     else :
        $server = "https://staging.liefery.com/api/courier_company/v1/shipments/";  // Test
     endif;
  endif;
  
  // $crEid = "";
  // if ($crId != "" && $crId != "0") :
  //    $crEid = getFieldValueFromId("courier","cr_id",$crId,"cr_eid");
  // endif;

  $shipmentId = $gdc_01;  // Init
  // if ($jbId != "" && $trSort != "") :
  if ($trId != "") :
     // $shipmentId = getFieldValueFromClause("genericdatacontainer", "gdc_content", "gdc_obj_type = 'tr' AND gdc_gen_fieldname = 'info_0' AND gdc_obj_id = '" . $jbId . "' AND gdc_context = '" . $trSort . "'");
     $shipmentId = getFieldValueFromClause("genericdatacontainer", "gdc_content", "gdc_obj_type = 'tr' AND gdc_gen_fieldname = 'info_0' AND gdc_obj_id = '" . $trId . "'");
     if ($shipmentId == "") :
        $shipmentId = $gdc_01;
        if ($shipmentId == "") :
           $shipmentId = getFieldValueFromClause("genericdatacontainer", "gdc_content", "gdc_obj_type = 'jb' AND gdc_gen_fieldname = 'info_0' AND gdc_obj_id = '" . $jbId . "'");
        endif;
     endif;
  endif;

  // $courierId = $crEid;
  $courierId = $crSid;
  if ($courierId == "") :
     $courierId = $gdc_02;
     if ($courierId == "") :
        $courierId = "5329aaec8e06c724ec000002";
     endif;
  endif;

  // Select API-Key from headquarters of the courier
  $currHq = "";
  if ($crId != "") :
     $currHq = getFieldValueFromId("courier","cr_id",$crId,"hq_id");
  endif;
  $apiKey = "533183292ad6210fd500001700000000OiEV3a6pl3AdL5qDQ79aCl22nBR6roCE";
  if ($currHq == "1") :
     $apiKey = "53319500e26daf03a300001b00000000clbCnJ3K9XjQ6XSbSPZNgmSoiKNO9LNh";
      $courierId = "5335a7f8e26daf03a300008f00000000";
  elseif ($currHq == "2") :
     $apiKey = "53354a542ad6210fd500006000000000VXBWIEM9q5Dh6SJcoYb1PRTfGAB9ehzV";
     // $courierId = "54116e80281ec24aff000143";
     $courierId = "54116e80281ec24aff00014300000000";
  elseif ($currHq == "3") :
     $apiKey = "ynPIWypFHvyQuykyU84SK77iOT_Xkl9u2BS9ExTwsY1F_cBx3OUi-DREjoBSxQpO";
     $courierId = "tHp_T3IsLKbTILsuBamACbmDGRonkwx_";
  elseif ($currHq == "4") :
     $apiKey = "53318d0b2ad6210fd500001900000000-uBBN9P_218rgLiex9lonWn2-NO1YxaC";
         $courierId = "5335a6b4e26daf03a300008e00000000";
  elseif ($currHq == "5") :
     $apiKey = "7SKbzWxaW9lcos49v2T6tASVBGeE7bSLtIfdp8zOfhFxGHNKPvLQYD0cIML3a3ZO";
     $courierId = "mlw2UpV--RkiqIvK1Vf9I1Pjkd2sY-hw";
  elseif ($currHq == "6") :
     $apiKey = "";
     $courierId = "";
  elseif ($currHq == "7") :
     $apiKey = "5331922de26daf03a300001900000000R0jD-YV20LTyFMbz1GaU1LRv1iejXSg2";
     $courierId = "5335a5de2ad6210fd500006b";
  elseif ($currHq == "8") :
     $apiKey = "";
     $courierId = "";
  elseif ($currHq == "9") :
     $apiKey = "XV2xAbdXu9qvEkmy7bt5-O_4fR1rlToUR4OjgyKf7437si404snx5oZyazUtVprB";
     $courierId = "XV2xAbdXu9qvEkmy7bt5-O_4fR1rlToU";
  elseif ($currHq == "10") :
     $apiKey = "";
     $courierId = "";
  elseif ($currHq == "11") :
     if ($isProductive) :
        $apiKey = "533183292ad6210fd500001700000000OiEV3a6pl3AdL5qDQ79aCl22nBR6roCE";
        $courierId = "5335a5152ad6210fd500006a";
     else :
        $apiKey = "I1PDEq_wy1zLKNYblJklO-k-42W02rOI5Ei6YK22mV_CYJm8jDoRAmCBzNw8RSbQ";  // 5335a5152ad6210fd500006a00000000JM6QrjNtF6snXEZEabRrthrOX7pcvkcq   I1PDEq_wy1zLKNYblJklO-k-42W02rOI5Ei6YK22mV_CYJm8jDoRAmCBzNw8RSbQ
        $courierId = "5335a5152ad6210fd500006a00000000";
     endif;
  elseif ($currHq == "90") :
         $apiKey = "";
         $courierId = "";
  endif;  

  // Convert timestamp from localtime to UTC  [2014-03-01 10:00:00   20140301100000]
  $timestamp = gmdate("Y-m-d H:i:s", mktime(substr($timestamp, 11, 2), substr($timestamp, 14,2), substr($timestamp, 17, 2), substr($timestamp, 5, 2), substr($timestamp, 8,2), substr($timestamp, 0, 4)));
  $timestamp = substr($timestamp,0,10). "T" . substr($timestamp,11) . "Z";

  $requestHeader = "";
  $requestBody = "";

  if ($stateEvent != "2" || $shipmentId != "") :

      // Define header request
      $requestHeader .= "PUT /" . $shipmentId . " HTTP/1.1\r\n";
      $requestHeader .= "Host: " . $server . "\r\n";
      // $requestHeader .= "Host: " . $server . $shipmentId . "\r\n";
      $requestHeader .= "Content-Type: application/json; charset=utf-8\r\n";
      $requestHeader .= "API-Key: " . $apiKey . " \r\n";
      $requestHeader .= "Content-Length: LENGTH\r\n";

      $shipments = array();

          $tmp_array = array();
          if ($stateEvent == "0") {
              $tmp_array['stateEvent'] = "accept";
              // $tmp_array['waybillNr'] = $tr1CommissionNo;
              $tmp_array['courierId'] = $courierId;
              $tmp_array['timestamps'] = array('acceptedAt' => $timestamp);
          }
          else if ($stateEvent == "1") {
              $tmp_array['stateEvent'] = "pickup";
              // $tmp_array['waybillNr'] = "A-" . $tr1CommissionNo;
              $tmp_array['courierId'] = $courierId;
              $tmp_array['timestamps'] = array('pickedupAt' => $timestamp);
          }
          else if ($stateEvent == "2") {
          	
          	  // Get event state from GDC
          	  $eventReason = getFieldValueFromClause("genericdatacontainer", "gdc_content", "gdc_obj_type = 'tr' AND gdc_gen_fieldname = 'del_code' AND gdc_obj_id = '" . $trId . "'");

          	  if ($eventReason == "" || $eventReason == "0" || ($eventReason >= "100" && $eventReason <= "199")) :
          	      // OK  <=>  dropoff
                 if ($eventReason == "101") :
                    $eventText = "with_contact";
                 elseif ($eventReason == "102") :
                    $eventText = "with_neighbour";
                 elseif ($eventReason == "103") :
                    $eventText = "in_safe_place";
                 else :
                    $eventText = "";
                 endif;
                 $tmp_array['stateEvent'] = "dropoff";
                 $tmp_array['finalConsignee'] = utf8_encode($trSignName);
                 $tmp_array['courierId'] = $courierId;
                 $tmp_array['dropOffSignature'] = $trSign;
                 $tmp_array['dropOffSignatureUrl'] = "";
                 // $tmp_array['waybillNr'] = "A-" . $tr1CommissionNo;
                 // $tmp_array['waybillNrConfirmation'] = "A-" . $tr1CommissionNo;              
                 $tmp_array['timestamps'] = array('droppedoffAt' => $timestamp);
                 if ($eventText != "") :
                    $tmp_array['dropOffOutcome'] = $eventText;
                 endif;
              elseif ($eventReason >= "1" && $eventReason <= "5") :
                 // Reasons
                 if ($eventReason == "1") :
                    $eventText = "address_not_found";
                 elseif ($eventReason == "2") :
                    $eventText = "recipient_not_found_at_address";
                 elseif ($eventReason == "3") :
                    $eventText = "recipient_not_there";
                 elseif ($eventReason == "4") :
                    $eventText = "acceptance_refused";
                 elseif ($eventReason == "5") :
                    $eventText = "allowed_time_exceeded";
                 else :
                    $eventText = "recipient_not_there";
                 endif;
                 $tmp_array['stateEvent'] = "undeliverable";
                 $tmp_array['undeliverableReason'] = $eventText;
                 // $tmp_array['courierId'] = $courierId;
                 // $tmp_array['dropOffSignature'] = $trSign;
                 // $tmp_array['dropOffSignatureUrl'] = "";
                 $tmp_array['timestamps'] = array('undeliverableAt' => $timestamp);

              elseif ($eventReason == "6") :
                 // Return to sender
                 $tmp_array['stateEvent'] = "returnedToSender";
                 $tmp_array['returnedToSenderContactName'] = "<Vorname Name>";
                 $tmp_array['returnedToSenderSignature'] = "<base 64 encoded image>";
                 $tmp_array['returnedToSenderSignatureUrl'] = "<URL alternativ>";
                 $tmp_array['timestamps'] = array('returnedToSenderAt' => $timestamp);
              endif;
          }

          $frameArray = array();
          $frameArray['shipment'] = $tmp_array;

      $shipments[] = $frameArray;
          
      $requestBody .= json_encode($shipments);
      // $requestBody .= array_to_json($shipments);
      $requestBody = substr($requestBody,1,-1);  // Remove "[" and "]"

      // $requestBody = urlencode($requestBody);

      $requestBodyLen = strlen($requestBody);

      $requestHeader = str_replace("LENGTH", $requestBodyLen, $requestHeader);
  endif;

  $requestConfigArray = array();
  if ($requestBody != "") :

     $requestConfigArray["CURLOPT_URL"] = $server . $shipmentId;
     $requestConfigArray["CURLOPT_HTTPHEADER"] = array('Content-Type: application/json', 'API-Key: ' . $apiKey);
     $requestConfigArray["CURLOPT_RETURNTRANSFER"] = true;
     $requestConfigArray["CURLOPT_CUSTOMREQUEST"] = "PUT";
     $requestConfigArray["CURLOPT_POSTFIELDS"] = $requestBody;  // JSON
     $requestConfigArray["CURLOPT_PUT"] = true;
  endif;

  return $requestConfigArray;
}

/*
LIVE-SERVER

Stadtbote Hamburg
53354a542ad6210fd500006000000000VXBWIEM9q5Dh6SJcoYb1PRTfGAB9ehzV
54116e80281ec24aff00014300000000

Stadtbote Bremen
53319500e26daf03a300001b00000000clbCnJ3K9XjQ6XSbSPZNgmSoiKNO9LNh
5335a7f8e26daf03a300008f

Stadtbote Hannover
53318d0b2ad6210fd500001900000000-uBBN9P_218rgLiex9lonWn2-NO1YxaC
5335a6b4e26daf03a300008e

Stadtbote Essen
5331922de26daf03a300001900000000R0jD-YV20LTyFMbz1GaU1LRv1iejXSg2
5335a5de2ad6210fd500006b

Stadtbote Stuttgart
533183292ad6210fd500001700000000OiEV3a6pl3AdL5qDQ79aCl22nBR6roCE
5335a5152ad6210fd500006a

Stadtbote Berlin
ynPIWypFHvyQuykyU84SK77iOT_Xkl9u2BS9ExTwsY1F_cBx3OUi-DREjoBSxQpO
tHp_T3IsLKbTILsuBamACbmDGRonkwx_


https://production.liefery.com/api/courier_company/v1/shipments/{id}


ALTE KEYS:

Die URL zu unserem Live-System ist https://api.boxture.com

Stuttgart
- API-Key: 3db5aa037419b4ebc01dd2b2ebdae92260e579fae59e1bee54444c12a8f5fa96b0fe6b730019623468ac69050eb4d6c1552c2191ae4358b6b6b238cec9684f7d8e
- Default-Courier: 5335a5152ad6210fd500006a

Hannover
- API-Key: 2886c1aad71896a85f10be499ccfab50576ef709b9f5aed0d3953c1dd6e9f0a94b4069ec6dddbc2f205295d7c06cff4513b9aefd922fae7da7ad8b9e8c936fa1b3
- Default-Courier: 5335a6b4e26daf03a300008e

Bremen
- API-Key: 50d1a0bbcf5c3e6c064555751486630c6dae48b915fd980388db35bb02146edfe0e2a8e5915041113cf78cdeeaa770d3e6f2795c79c75d55752bbd283ec4ba9d23
- Default-Courier: 5335a7f8e26daf03a300008f

Essen:
- API-Key: 7ca03a459bd79c9d532e49847c57a6af5c5b33d0d9290892e8f974774da81ce16d04468a7bc360729ec695c52a496199a90218ba8144fa16b08bccaa88d58457ea
- Default-Courier: 5335a5de2ad6210fd500006b

Frankfurt:
- API-Key: 7SKbzWxaW9lcos49v2T6tASVBGeE7bSLtIfdp8zOfhFxGHNKPvLQYD0cIML3a3ZO
- Default-Courier: mlw2UpV--RkiqIvK1Vf9I1Pjkd2sY-hw

---------------------------------------------------------------

<auth>
  <customer>STE902167</customer>
  <account>STE902167</account>
  <password>E76030</password>
  <session_id>7ffe81740cade70f9263a9975441c4738f14e45fceea167a5a36dedd4bea25435e4501423aa679c09905ae4eb62326bad41d8cd98f00b204e9800998ecf8427e</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STF910210</customer>
  <account>STF910210</account>
  <password>F74065</password>
  <session_id>a41c3b5da4b5a60a165094e92c46da60e4da3b7fbbce2345d7772b0674a318d53007974533de92d327c3ba480c3cdad7d41d8cd98f00b204e9800998ecf8427e</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STH912317</customer>
  <account>STH912317</account>
  <password>H25844</password>
  <session_id>b571ecea16a9824023ee1af16897a582a87ff679a2f3e71d9181a67b7542122c3314b5b0e6ddd39121e0f5f5fe6ff17ad41d8cd98f00b204e9800998ecf8427e</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STHB922577</customer>
  <account>STHB922577</account>
  <password>HB58430</password>
  <session_id>eddc3427c5d77843c2253f1e799fe933c4ca4238a0b923820dcc509a6f75849b80a6dad2b1ef0d20f544c1d35a25a227d41d8cd98f00b204e9800998ecf8427e</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STHH933613</customer>
  <account>STHH933613</account>
  <password>HH36261</password>
  <session_id>d0b1ca03aeb8339058e0e19fc2db036ec81e728d9d4c2f636f067f89cc14862c250359b274480b1a27a4d47c98447504d41d8cd98f00b204e9800998ecf8427e</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STS910253</customer>
  <account>STS910253</account>
  <password>S36944</password>
  <session_id>628347fbb4918e2e37cf2fcee4dd08446512bd43d9caa6e02c990b0a82652dca337f2dee67b0fe40d4169fe933cf655ed41d8cd98f00b204e9800998ecf8427e</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STE902177</customer>
  <account>STE902</account>
  <password></password>
  <session_id>9b531edcbb1a4a81e667cd8acce6b8ab8f14e45fceea167a5a36dedd4bea2543bdc080c32c5edd1ab628194ce536e22cd41d8cd98f00b204e9800998ecf8427e</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STS910261</customer>
  <account>STS910261</account>
  <password>S92485</password>
  <session_id>d50819673fa91c9989e1fe612b2b33ad6512bd43d9caa6e02c990b0a82652dca6698f38a402e2c9c5028fff22afd0f4ed41d8cd98f00b204e9800998ecf8427e</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STB976216</customer>
  <account>STB976216</account>
  <password>B28511</password>
  <session_id>5208093bcaf65dfea07bdab31d600223eccbc87e4b5ce2fe28308fd9f2a7baf3918f19ee4d8d357b2c0b1e2829e0a336d41d8cd98f00b204e9800998ecf8427e</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STB976760</customer>
  <account>STB976760</account>
  <password>B60261</password>
  <session_id>f18374bf891c9af64c8570448824202deccbc87e4b5ce2fe28308fd9f2a7baf317596b91fbef0fe352a6b00be1dfb40c893f9ac5e7d0c6e2c4c26761c15c4af9</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STB976780</customer>
  <account>STB976780</account>
  <password>B26083</password>
  <session_id>62519b8f83ec10cacb56d46342ace8f1eccbc87e4b5ce2fe28308fd9f2a7baf30f65c96875ed191f3ab94cfc7d383d5affd47d8bdc978eb69b96e2d48992afc1</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STF910443</customer>
  <account>STF910443</account>
  <password>F57784</password>
  <session_id>048517851c55e77cf9daf170c6fdd7abe4da3b7fbbce2345d7772b0674a318d5c5fa5e48399291c4ddb36bbab0ebd2031972b3b9d298fe3ffa54a9d0d57dcda7</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STF910444</customer>
  <account>STF910444</account>
  <password>F35555</password>
  <session_id>ee42b626f7b6b71a7bceb60cf7108c25e4da3b7fbbce2345d7772b0674a318d580d949a4d2a4efc1d0698d7d68ac9d2b6c73f68bc42d0b927a0a6dfadad79903</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STH912530</customer>
  <account>STH912530</account>
  <password>H89523</password>
  <session_id>f92f63172a3f74ff5261c053eb025d5ea87ff679a2f3e71d9181a67b7542122cb1ef1755e94b1c822b4b0b449c8704141d42e63c5bdecce30e964d2dd9b374ac</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STH912531</customer>
  <account>STH912531</account>
  <password>H96620</password>
  <session_id>142949df56ea8ae0be8b5306971900a4a87ff679a2f3e71d9181a67b7542122cccc116f88f66b9e4d06dd3f7a8a045fec3fe7d066f16d37d5150397dd33444b0</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STHB922841</customer>
  <account>STHB922841</account>
  <password>HB69303</password>
  <session_id>9424aa849c54613a0086d9003cb1e5f7c4ca4238a0b923820dcc509a6f75849bfeb6090f6679f2bcea159f271207db99bbb172b21d61dadab3264c69a11dacc3</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STHB922864</customer>
  <account>STHB922864</account>
  <password></password>
  <session_id>2e6167426b4b6a4c272e01676d5df893c4ca4238a0b923820dcc509a6f75849bec81dbd71f2f961b6f275a62272b91b94366507ff6316b659acc6b8d2d52ba5b</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STHH933614</customer>
  <account>STHH933614</account>
  <password>HH65147</password>
  <session_id>fba9d88164f3e2d9109ee770223212a0c81e728d9d4c2f636f067f89cc14862cf4994494b8bbb3c4ecfefc46c5c0b917c6ebd0d31790d76b611b2c4ce3531d27</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STHH933615</customer>
  <account>STHH933615</account>
  <password>HH65331</password>
  <session_id>e90a598324002f2bee63f39b95a52ff1c81e728d9d4c2f636f067f89cc14862c8fe18f245df6dd1995cdefbcf25379a7f835d7c99c5331008186d85593f89ac6</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STL915109</customer>
  <account>STL915109</account>
  <password>L68407</password>
  <session_id>66be31e4c40d676991f2405aaecc6934c9f0f895fb98ab9159f51fd0297e236dc0e26efa96c6d7c6bde47425c7c1cca7e3cb5bea40045e4fca82ed9fdf40507d</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STL915259</customer>
  <account>STL915259</account>
  <password>L90781</password>
  <session_id>39ba1389e2930ff24e3101741c9009eac9f0f895fb98ab9159f51fd0297e236d44488ea98d1be0f9daaa8fad6a493afdfef99de5f961a594ea5b83d7eaf3265d</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STL915260</customer>
  <account>STL915260</account>
  <password>L62365</password>
  <session_id>37f0e884fbad9667e38940169d0a3c95c9f0f895fb98ab9159f51fd0297e236d877f8693f6620fef9387cee96f9c14c11db6470923bda5ebbe50f272b3fa7547</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STS910297</customer>
  <account>STS910297</account>
  <password>S59326</password>
  <session_id>7fa215c9efebb3811a7ef584099078996512bd43d9caa6e02c990b0a82652dca027c83b2145cb1c705d126d80edfa8fd6d42cb640a4e647f2bf7abcd4fbf68e8</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STM900020</customer>
  <account>STM900020</account>
  <password>M93211</password>
  <session_id>c20bb2d9a50d5ac1f713f8b34d9aac5a45c48cce2e2d7fbdea1afc51c7c6ad26b6be1c803f97f0c02697185bd996a97172fb3b9ff0fc07f1c4c7fb14bafaccf5</session_id>
  <costcenter_name></costcenter_name>
</auth>

<auth>
  <customer>STM900021</customer>
  <account>STM900021</account>
  <password>M41257</password>
  <session_id>7fd60e83598ba7103b06e21feac9f43545c48cce2e2d7fbdea1afc51c7c6ad26a2c0c58cddd36b178234e81e36c9dd9fa66b86d728126455fae5b98d7473eb9e</session_id>
  <costcenter_name></costcenter_name>
</auth>

----

TESTSYSTEM:

https://mps1.assecutor.de/test_sb/tools/order_request.php

<auth>
  <customer>STS910195</customer>
  <account>STS910195</account>
  <password>S10195_TEST</password>
  <session_id>4e9800998ecf8427d04f1621a119799fd3d7545d3dc81e728d9d41802d63508455ca9038f00b20db4e74220d41d8ea6cd98c2f636f067f89cc14862c8d34e6d8</session_id>
  <costcenter_name></costcenter_name>
</auth>

*/
?>