Svea/AdminService/AdminServiceRequest.php
/**
     * Set up the soap client and perform the soap call, with the soap action and prepared request from the relevant subclass.
     * Returns the appropriate request response class, as determined by SveaResponse matching on request action.
     */
Set up the soap client and perform the soap call, with the soap action and prepared request from the relevant subclass.
Returns the appropriate request response class, as determined by SveaResponse matching on request action.
Set up the soap client and perform the soap call with the soap action and prepared request from the relevant subclass . Returns the appropriate request response class as determined by SveaResponse matching on request action .
public function doRequest( $resendOrderWithFlippedPriceIncludingVat = false ) {
        $requestObject = $this->prepareRequest( $resendOrderWithFlippedPriceIncludingVat );
        $soapClient = new AdminSoap\SoapClient( $this->orderBuilder->conf, \ConfigurationProvider::ADMIN_TYPE );
        $soapResponse = $soapClient->doSoapCall($this->action, $requestObject );
        $sveaResponse = new \SveaResponse( $soapResponse, null, null, $this->action );
        $response = $sveaResponse->getResponse();
        if ($response->resultcode == "50036") {
            if(property_exists($requestObject, 'OrderRows')) {
                 $priceIncludingVat =  $requestObject->OrderRows->enc_value->enc_value[0]->enc_value->PriceIncludingVat->enc_value;
            }  elseif (property_exists($requestObject, 'UpdatedOrderRows')) {
                 $priceIncludingVat =  $requestObject->UpdatedOrderRows->enc_value->enc_value[0]->enc_value->PriceIncludingVat->enc_value;
            } else {
                $priceIncludingVat = $this->priceIncludingVat;
            }
            $this->priceIncludingVat = !$priceIncludingVat;
            return $this->doRequest( true );
        }
        else {
            return $sveaResponse->getResponse();
        }
    }
public function doRequest ( $ resendOrderWithFlippedPriceIncludingVat = false ) { $ requestObject = $ this -> prepareRequest ( $ resendOrderWithFlippedPriceIncludingVat ) ; $ soapClient = new AdminSoap \ SoapClient ( $ this -> orderBuilder -> conf , \ ConfigurationProvider :: ADMIN_TYPE ) ; $ soapResponse = $ soapClient -> doSoapCall ( $ this -> action , $ requestObject ) ; $ sveaResponse = new \ SveaResponse ( $ soapResponse , null , null , $ this -> action ) ; $ response = $ sveaResponse -> getResponse ( ) ; if ( $ response -> resultcode == " 50036 " ) { if ( property_exists ( $ requestObject , 'OrderRows' ) ) { $ priceIncludingVat = $ requestObject -> OrderRows -> enc_value -> enc_value [ 0 ] -> enc_value -> PriceIncludingVat -> enc_value ; } elseif ( property_exists ( $ requestObject , 'UpdatedOrderRows' ) ) { $ priceIncludingVat = $ requestObject -> UpdatedOrderRows -> enc_value -> enc_value [ 0 ] -> enc_value -> PriceIncludingVat -> enc_value ; } else { $ priceIncludingVat = $ this -> priceIncludingVat ; } $ this -> priceIncludingVat = ! $ priceIncludingVat ; return $ this -> doRequest ( true ) ; } else { return $ sveaResponse -> getResponse ( ) ; } }
Set up the soap client and perform the soap call, with the soap action and prepared request from the relevant subclass.
Set up the soap client and perform the soap call with the soap action and prepared request from the relevant subclass .
// iff error 50036, flip priceIncludingVat and resend enforcing flipped value