academe / OmniPay-Payone

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

Aimeos unable to get result for Shop_Frontend API #20

Open judgej opened 7 years ago

judgej commented 7 years ago

The Shop_Frontend API does not support completeAuthorize() or completePurchase(). It also does not directly support acceptNotification(), which is located in the Shop_Server API.

Aimeos uses the capabilities of each API to determine how to handle incoming requests, either from the user returned from a redirect or POST, or an incoming request direct from the gateway (a back-channel request). So this is confusing Aimeos a little, quite rightly.

judgej commented 7 years ago

Since Shop_Frontend gets its transaction result from the acceptNotification back channel, it makes sense that this gateway directly supports the acceptNotification() method. Starting a transaction on Shop_Frontend API and then switching over to the Shop_Server API to get the results is unintuitive for us, and totally obscure to the merchant site without some custom handling for this gateway.

So acceptNotification() will be added to both the ShopClientGateway and the ShopFrontendGateway.

judgej commented 7 years ago

acceptNotification() implemented for all three APIs.

Needs some tests written before a release.

judgej commented 7 years ago

Note that:

For the Shop_Server API, because there may not be a user redirect involved, the notification request may come from the gateway some time after the transaction result has been returned by the direct server transaction request. The PAYONE documentation will describe the timings and order of the process in more detail.