academe / OmniPay-Payone

A PAYONE gateway driver for the OmniPay framework
MIT License
15 stars 16 forks source link

acceptNotification more consistency in response method #21

Open judgej opened 7 years ago

judgej commented 7 years ago

The object returned by acceptNotification is a server request incoming from the gateway. The Omnipay core documentation does not suggest any standard ways to acknowledge the notification. At the moment this involves using $request->send() to get a response object, and then $response->acknowledge() to return and acknowledgement and then immediately exit.

Instead, it makes more sense to return a HTTP response that can then be used in the response by the merchant site when it is ready. That response can include a body, headers and a specific HTTP code as appropriate to the state of the request.