Skip to content
This repository has been archived by the owner on May 2, 2018. It is now read-only.

Commit

Permalink
Merge pull request dingproject#1 from runephilosof/alma_debt
Browse files Browse the repository at this point in the history
Revert "right parameter name" and "extract debt_ids from params"
  • Loading branch information
cableman committed Oct 8, 2012
2 parents 28d12c5 + 8164f7c commit c982866
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions includes/alma.debt.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit c982866

Please sign in to comment.