From 37afef269d5f75366fc6b0b2047d6d3dfaffff5f Mon Sep 17 00:00:00 2001 From: Mohamed DAOUD Date: Wed, 4 Dec 2024 18:25:56 +0100 Subject: [PATCH] Accumulate payment methods --- htdocs/helloasso/class/actions_helloasso.class.php | 7 +++---- .../class/actions_stancerdolicloud.class.php | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/htdocs/helloasso/class/actions_helloasso.class.php b/htdocs/helloasso/class/actions_helloasso.class.php index f942e7ba5..a811aec75 100644 --- a/htdocs/helloasso/class/actions_helloasso.class.php +++ b/htdocs/helloasso/class/actions_helloasso.class.php @@ -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; @@ -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; } } diff --git a/htdocs/stancerdolicloud/class/actions_stancerdolicloud.class.php b/htdocs/stancerdolicloud/class/actions_stancerdolicloud.class.php index 44ce4b03b..322f11747 100644 --- a/htdocs/stancerdolicloud/class/actions_stancerdolicloud.class.php +++ b/htdocs/stancerdolicloud/class/actions_stancerdolicloud.class.php @@ -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; @@ -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; } }