Skip to content

Commit

Permalink
Merge pull request #76 from Daoud-mohamed/Accumulate-payment-methods
Browse files Browse the repository at this point in the history
Fix Hook Returns to Improve Payment Module Compatibility
  • Loading branch information
eldy authored Dec 5, 2024
2 parents 16ef1b1 + 37afef2 commit 080d37d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions htdocs/helloasso/class/actions_helloasso.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ public function doAddButton($parameters, &$object, &$action, $hookmanager)

if (!$error) {
$this->resprints = $resprints;
return 1; // or return 1 to replace standard code
return 0; // or return 1 to replace standard code
} else {
$this->errors[] = $error;
return -1;
Expand Down Expand Up @@ -741,12 +741,11 @@ public function getBankAccountPaymentMethod($parameters, &$object, &$action, $ho
}
}

if (!$error) {
if (!$error && $bankaccountid > 0) {
$this->results["bankaccountid"] = $bankaccountid;
return 1;
} else {
$this->errors[] = $langs->trans("BankAccountNotFound");
return -1;
return 0;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ public function doAddButton($parameters, &$object, &$action, $hookmanager)

if (!$error) {
$this->resprints = $resprints;
return 1; // or return 1 to replace standard code
return 0; // or return 1 to replace standard code
} else {
$this->errors[] = $error;
return -1;
Expand Down Expand Up @@ -731,12 +731,11 @@ public function getBankAccountPaymentMethod($parameters, &$object, &$action, $ho
}
}

if (!$error) {
if (!$error && $bankaccountid > 0) {
$this->results["bankaccountid"] = $bankaccountid;
return 1;
} else {
$this->errors[] = $langs->trans("BankAccountNotFound");
return -1;
return 0;
}
}

Expand Down

0 comments on commit 080d37d

Please sign in to comment.