Per other comment below, the standard pattern in Omnipay would be to call `$data->asXML()` here instead of inside the `getData()` method.