Example #1
0
 /**
  * Updates the orders for which status updates were received via direct requests (like HTTP).
  *
  * @param array $params Associative list of request parameters
  * @param string|null $body Information sent within the body of the request
  * @param string|null &$response Response body for notification requests
  * @param array &$header Response headers for notification requests
  * @return \Aimeos\MShop\Order\Item\Iface|null Order item if update was successful, null if the given parameters are not valid for this provider
  */
 public function updateSync(array $params = array(), $body = null, &$response = null, array &$header = array())
 {
     if (isset($params['id'])) {
         return parent::updateSync($params, $body, $response);
     }
     if (isset($params['orderid'])) {
         return $this->getOrder($params['orderid']);
     }
 }
Example #2
0
 /**
  * Updates the orders for which status updates were received via direct requests (like HTTP).
  *
  * @param array $params Associative list of request parameters
  * @param string|null $body Information sent within the body of the request
  * @param string|null &$output Response body for notification requests
  * @param array &$header Response headers for notification requests
  * @return \Aimeos\MShop\Order\Item\Iface|null Order item if update was successful, null if the given parameters are not valid for this provider
  */
 public function updateSync(array $params = array(), $body = null, &$output = null, array &$header = array())
 {
     if (isset($params['x_MD5_Hash'])) {
         $result = parent::updateSync($params, $body, $output, $header);
         if ($result !== null) {
             $url = $this->getConfigValue(array('payment.url-success'));
             $header[] = $this->getValue('header', 'Location: ' . $url);
             $output = sprintf($this->getValue('body', 'success'), $url);
         }
         return $result;
     }
     if (isset($params['orderid'])) {
         return $this->getOrder($params['orderid']);
     }
 }