It seems like the OffsiteCaptureAction from the OmnipayBridge is not compatible with the Omnipay/Mollie gateway.
The following part from OffsiteCaptureAction.php is incompatible:
if (false == $details['returnUrl'] && $request->getToken()) {
$details['returnUrl'] = $request->getToken()->getTargetUrl();
}
If you replace the incompatible part with the following lines of code, it works:
if (false == $details['returnUrl'] && $request->getToken()) {
$details['returnUrl'] = $request->getToken()->getAfterUrl();
}
if (false == $details['notifyUrl'] && $request->getToken()) {
$details['notifyUrl'] = $request->getToken()->getTargetUrl();
}
The Mollie gateway uses the notifyUrl as webhook to confirm the payments. This is the most important part of the payment. After it used the webhook/notifyUrl in the background, the customer will be redirected to the returnUrl/AfterUrl. The original piece of code was missing the notifyUrl, and was redirecting the customer to the payment confirmation URL.
It is possible that these changes are not compatible with other gateways. I only use Mollie so it is not a big problem for me.
I have made a fork for the 0.14 branch:
https://github.com/goemaere/OmnipayBridge/blob/0.14/src/Action/OffsiteCaptureAction.php#L43-L49