Skip to content

Commit 9f5d681

Browse files
committed
Merge pull request #10 from kdb/no-auth-check-add-payment
Removed auth check from add payment callback.
2 parents dbd620f + a073a4e commit 9f5d681

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

alma_user/alma_user.module

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -241,15 +241,13 @@ function alma_user_ding_debt_list_form_pay($form, &$form_state) {
241241
}
242242

243243
/**
244+
* Register a transaction as paid.
244245
*
246+
* Called by the dibs module when transaction is completed.
247+
*
248+
* @param array $transatction
249+
* Transaction array as provided by DIBS.
245250
*/
246251
function alma_user_debt_dibs_add_payment($transaction) {
247-
global $user;
248-
$creds = ding_library_user_get_credentials($user);
249-
if ($creds == DING_PROVIDER_AUTH_REQUIRED) {
250-
watchdog('alma_user', 'No session in add payment. Transaction: @transaction', array('@transaction' => print_r($transaction, TRUE)), WATCHDOG_EMERG);
251-
}
252-
else {
253-
alma_client_invoke('add_payment', implode(',', $transaction['params']['selected_debts']), $transaction['payment_order_id']);
254-
}
252+
alma_client_invoke('add_payment', implode(',', $transaction['params']['selected_debts']), $transaction['payment_order_id']);
255253
}

0 commit comments

Comments
 (0)