Skip to content

Commit 31f0051

Browse files
Alternate fix for Mollie url issue #6
1 parent ceeb1c1 commit 31f0051

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

CRM/Core/Payment/OmnipayMultiProcessor.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,12 +810,14 @@ public function processPaymentNotification($params) {
810810
$_REQUEST = $params;
811811
try {
812812
$response = $this->gateway->completePurchase($params)->send();
813-
814813
if ($response->getTransactionId()) {
815814
$this->setTransactionID($response->getTransactionId());
816815
}
817816
}
818817
catch (\Omnipay\Common\Exception\InvalidRequestException $e) {
818+
$q = explode('/', CRM_Utils_Array::value(CRM_Core_Config::singleton()->userFrameworkURLVar, $_GET, ''));
819+
array_pop($q);
820+
$this->setTransactionID(array_pop($q));
819821
$this->redirectOrExit('success');
820822
}
821823

CRM/Core/Payment/PaymentExtended.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ protected function getGoBackUrl($qfKey) {
184184
protected function getNotifyUrl($allowLocalHost = FALSE) {
185185
if (omnipaymultiprocessor__versionAtLeast(4.6)) {
186186
$url = CRM_Utils_System::url(
187-
'civicrm/payment/ipn/' . $this->_paymentProcessor['id'],
187+
'civicrm/payment/ipn/' . $this->transaction_id . '/' . $this->_paymentProcessor['id'],
188188
array(),
189189
TRUE,
190190
NULL,
@@ -214,9 +214,7 @@ protected function getNotifyUrl($allowLocalHost = FALSE) {
214214
*/
215215
protected function storeReturnUrls($qfKey, $participantID = NULL, $eventID = NULL) {
216216
CRM_Core_Session::singleton()->set("ipn_success_url_{$this->transaction_id}", $this->getReturnSuccessUrl($qfKey));
217-
CRM_Core_Session::singleton()->set("ipn_success_url_fallback", $this->getReturnSuccessUrl($qfKey));
218217
CRM_Core_Session::singleton()->set("ipn_fail_url_{$this->transaction_id}", $this->getReturnFailUrl($qfKey, $participantID, $eventID));
219-
CRM_Core_Session::singleton()->set("ipn_fail_url_fallback", $this->getReturnFailUrl($qfKey, $participantID, $eventID));
220218
}
221219

222220
/**
@@ -239,7 +237,7 @@ protected function storeTransparentRedirectFormData($key, $data) {
239237
* Url to redirect to
240238
*/
241239
protected function getStoredUrl($type) {
242-
return CRM_Core_Session::singleton()->get("ipn_{$type}_url_" . ($this->transaction_id ? : 'fallback'));
240+
return CRM_Core_Session::singleton()->get("ipn_{$type}_url_{$this->transaction_id}");
243241
}
244242

245243
/**

0 commit comments

Comments
 (0)