From 8164f7c24c35e41446fbf71f9823a363fdc8f8e4 Mon Sep 17 00:00:00 2001 From: Rune Schjellerup Philosof Date: Thu, 4 Oct 2012 11:44:20 +0200 Subject: [PATCH] Revert "right parameter name" and "extract debt_ids from params" This is an undocumented API change. Moreover, it was a faulty implementation. It should have been debt_ids instead of order_ids... This reverts commit 5d4dc109dde97f644b5f91ab458f5444f3696e71. This reverts commit 7cf109c6f6f0a3fbc3500e248ddb4e515e3e09b4. Conflicts: includes/alma.debt.inc --- includes/alma.debt.inc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/includes/alma.debt.inc b/includes/alma.debt.inc index c45f65f..609e5e3 100644 --- a/includes/alma.debt.inc +++ b/includes/alma.debt.inc @@ -36,18 +36,9 @@ function alma_debt_list($account) { * @param mixed $order_id * Order ID of the payment transaction, to be recorded in the backend system. */ -function alma_debt_payment_received($amount, $params = array(), $order_id = NULL) { +function alma_debt_payment_received($amount, $debt_ids = array(), $order_id = NULL) { // TODO: We should probably check that $amount adds up to the debts // we're going to mark paid, since Alma doesn't. - if( !empty($params['order_ids']) ) { - $debt_ids = $params['debt_ids']; - } - elseif( !empty($params['debts']) ) { - $debt_ids = array_keys($params['debts']) ; - } - else { - $debt_ids = array(); - } return alma_client_invoke('add_payment', implode(',', $debt_ids), $order_id); }