title: Thoughts on passing HttpRequest and HttpResponse to service layer?
body: <p>I have a CommerceService module to help with common order processing functionality, which includes things like payment authorization through providers like Authorize.net, Paypal, and Google Checkout. It provides a simple interface such as placeOrder(Order) and does the heavy lifting.</p>
  
  <p>Things are straight forward with local payment providers, however Paypal and Google offer remote payment services, so with Paypal for example, the user can leave your site, pay there, and Paypal will send an Http notification to hook into your order process.</p>
  
  <p>The question I have is handling these notifications. Ideally it would be easiest to just pass the HttpRequest object to the service layer and let the service fulfill the order with a handleRemoteOrder(Request, Response), rather than force the front end to worry about any of this. But it seems intuitively wrong to be passing the request and response to the service layer.</p>
  
  <p>I thought about extracting the request parameters to a Map and simply passing that but the google checkout java sdk works explicitly on the request and response objects, so it would be a hassle to not utilize the sdk over this concern.</p>
  
  <p>Is it frowned upon to pass the HttpRequest so far back? And if so, should there be front end logic to handle this? Or is this an unfounded worry and I shouldn't be thinking so much? </p>