From 0c8ce8619061ce732c608261bc81ee4f05d4571e Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Wed, 13 May 2015 15:21:30 +1200 Subject: [PATCH 1/2] Use notifyUrl not returnUrl for callback Omnipay supports a notifyUrl for callbacks and a returnUrl for the browser. This patch causes the notifyUrl to be used for callbacks by securePay --- src/Message/DirectPostAuthorizeRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Message/DirectPostAuthorizeRequest.php b/src/Message/DirectPostAuthorizeRequest.php index 6f5a7ee..38cffe8 100644 --- a/src/Message/DirectPostAuthorizeRequest.php +++ b/src/Message/DirectPostAuthorizeRequest.php @@ -22,7 +22,7 @@ public function getData() $data['EPS_TIMESTAMP'] = gmdate('YmdHis'); $data['EPS_FINGERPRINT'] = $this->generateFingerprint($data); $data['EPS_RESULTURL'] = $this->getReturnUrl(); - $data['EPS_CALLBACKURL'] = $this->getReturnUrl(); + $data['EPS_CALLBACKURL'] = $this->getNotifyUrl(); $data['EPS_REDIRECT'] = 'TRUE'; $data['EPS_CURRENCY'] = $this->getCurrency(); From dc7545dc44fdf2d4ab4f70fac919803108223642 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 7 Apr 2016 20:47:44 +1200 Subject: [PATCH 2/2] Add fallback on notify url --- src/Message/DirectPostAuthorizeRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Message/DirectPostAuthorizeRequest.php b/src/Message/DirectPostAuthorizeRequest.php index 38cffe8..e40d673 100644 --- a/src/Message/DirectPostAuthorizeRequest.php +++ b/src/Message/DirectPostAuthorizeRequest.php @@ -22,7 +22,7 @@ public function getData() $data['EPS_TIMESTAMP'] = gmdate('YmdHis'); $data['EPS_FINGERPRINT'] = $this->generateFingerprint($data); $data['EPS_RESULTURL'] = $this->getReturnUrl(); - $data['EPS_CALLBACKURL'] = $this->getNotifyUrl(); + $data['EPS_CALLBACKURL'] = $this->getNotifyUrl() ?: $this->getReturnUrl(); $data['EPS_REDIRECT'] = 'TRUE'; $data['EPS_CURRENCY'] = $this->getCurrency();