public static function create($order)
    {
        $data = OpenPayU_Util::buildJsonFromArray($order);

        if (empty($data)) {
            throw new OpenPayU_Exception('Empty message OrderCreateRequest');
        }

        try {
            $authType = self::getAuth();
        } catch (OpenPayU_Exception $e) {
            throw new OpenPayU_Exception($e->getMessage(), $e->getCode());
        }

        $pathUrl = OpenPayU_Configuration::getServiceUrl() . self::ORDER_SERVICE;

        $result = self::verifyResponse(OpenPayU_Http::doPost($pathUrl, $data, $authType), 'OrderCreateResponse');

        return $result;
    }
public static function create($order)
    {
        $data = OpenPayU_Util::buildJsonFromArray($order);

        if (empty($data)) {
            throw new OpenPayU_Exception('Empty message OrderCreateRequest');
        }

        try {
            $authType = self::getAuth();
        } catch (OpenPayU_Exception $e) {
            throw new OpenPayU_Exception($e->getMessage(), $e->getCode());
        }

        $pathUrl = OpenPayU_Configuration::getServiceUrl() . self::ORDER_SERVICE;

        $result = self::verifyResponse(OpenPayU_Http::doPost($pathUrl, $data, $authType), 'OrderCreateResponse');

        return $result;
    }
public static function create ( $ order ) { $ data = OpenPayU_Util :: buildJsonFromArray ( $ order ) ; if ( empty ( $ data ) ) { throw new OpenPayU_Exception ( 'Empty message OrderCreateRequest' ) ; } try { $ authType = self :: getAuth ( ) ; } catch ( OpenPayU_Exception $ e ) { throw new OpenPayU_Exception ( $ e -> getMessage ( ) , $ e -> getCode ( ) ) ; } $ pathUrl = OpenPayU_Configuration :: getServiceUrl ( ) . self :: ORDER_SERVICE ; $ result = self :: verifyResponse ( OpenPayU_Http :: doPost ( $ pathUrl , $ data , $ authType ) , 'OrderCreateResponse' ) ; return $ result ; }
Creates new Order
- Sends to PayU OrderCreateRequest

@param array $order A array containing full Order
@return object $result Response array with OrderCreateResponse
@throws OpenPayU_Exception
Creates new Order - Sends to PayU OrderCreateRequest