academe / omnipay-datatrans

Omnipay Datatrans
MIT License
4 stars 4 forks source link

errorUrl() should default to returnUrl() #4

Closed judgej closed 5 years ago

judgej commented 6 years ago

Omnipay does not distinguish between a success URL (authorised) and an error URL (declined), but Datatrans does, and requires both URLs to be supplied. The URLs can be set in the account and left unset at runtime, or set at runtime.

If set at runtime, when an application sets just the returnUrl() then it expects both success and error results to go to the same place. In this case errorUrl() needs to default to the returnUrl().

An application should still be able to supply a separate errorUrl() if it needs to use it.

judgej commented 5 years ago

This would have made it into release version 3.0.5 but wasn't noted at the time.