CS-Cart adds unwanted content to XML-output

Hi,



I have a problem with paymentprocessor (redirects to external paypage)



When my shop gets callback/notify then my psp expects xml-replay. My function for make/sending reply looks something like this…


function xmlresponse($status, $message){
$notifyresponse = "";
$notifyresponse .= "";
$notifyresponse .= "". $status ."";
$notifyresponse .= "". $message ."";
$notifyresponse .= "
";
echo $notifyresponse;
//exit;
}




Unfortunately cs-cart adds “” at the end of xml-output, if I make exit in function it works but then I can´t do the rest of the job…



Perhaps cs-cart has a built-in feature for sending print / echo without the addition of something, or perhaps I could do it any other way?



btw, I'm building this paymentprocessor on cs3, but I think it's same on cs2



------- Log from psp

Your notification callback page 'http://www.mydomain.com/cs/index.php?dispatch=payment_notification.notify&payment=my_processor&order_id=91'; is not responding properly.

We were unable to parse the response from your callback page: Data at the root level is invalid.



We received the following response from your callback page:



– START MESSAGE --------------------------------------------------------

1OK

– END MESSAGE-----------------------------------------------------------

Cs-cart will add the meta-refresh if output occurs from a REQUEST_METHOD of POST. You need to redirect before responding and then you can send whatever you want. The other alternative is to have the payment provider do the callback as a GET.

[quote name='tbirnseth' timestamp='1335764475' post='135584']

Cs-cart will add the meta-refresh if output occurs from a REQUEST_METHOD of POST. You need to redirect before responding and then you can send whatever you want. The other alternative is to have the payment provider do the callback as a GET.

[/quote]



The callback from psp are coming when user has been redirected and when he has made his payment on psp´s webpage, before user is redirected back to shop.