LOL - maybe you broke the post counter.
To post up the whole error message paste the code in the editor - highlight it and then select 'code' from the Styles box - this should preserve it and prevent it from getting garbled.
The error you have posted is saying that line 518 cannot print anything to the browser as something else already has - line 533 (headers can only be sent to browser once), but line 533 (an error handler) seems to have already sent something to the browser as an error has been detected - it is this error that we need to find.
Looking a bit closer it is perhaps more likely that the result code received by the provider is incorrect - it's expecting to see a value of 1 - this is checked immediately prior to line 518 - where the redirect is sent to the browser. However, if this error is detected the error handler is called (line 533) but the script is not stopped and is allowed to proceed (to line 518). So two headers are trying to be sent to the browser - causing an issue.
This is the line that checks for the payment result - that trips the error handler (result code 1 not received)
if((int)$aResult['code'] == 1)
$this->_oCart->updateInfo((int)$aResult['pending_id']);
else
$this->_
So if the user is NOT logged in - update the cart as 'pending_id', BUT if the user IS logged in (or any other error value is detected) call the error handler. The code does not check for a positive result code - ie code 0 - 'success'. Looks to me like the code is wrong.
Assuming that code 0 is OK / Success - It should probably be...
if((int)$aResult['code'] == 1)
$this->_oCart->updateInfo((int)$aResult['pending_id']);
else if((int)$aResult['code'] != 0)
$this->_onError($aResult);
However - without a working example to test myself, and only having a cursory glance through the code, this needs further verification. Perhaps best advice is report the issue to your agent.
HTH
/DM