From 3d44b58b55dccc0fa5f599cdb4c00edb86fdc990 Mon Sep 17 00:00:00 2001 From: erickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4> Date: Tue, 6 Jul 2010 19:30:03 +0000 Subject: [PATCH] return IDs of newly created payments on success git-svn-id: svn://svn.open-ils.org/ILS/trunk@16858 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm index e7210a0355..7d8595e7b0 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm @@ -69,7 +69,7 @@ __PACKAGE__->register_method( ], "return" => { "desc" => - q{1 on success, event on failure. Event possibilities include: + q{Array of payment IDs on success, event on failure. Event possibilities include: BAD_PARAMS Bad parameters were given to this API method itself. See note field. @@ -299,6 +299,7 @@ sub make_payments { ### RE-OPEN TRANSACTION HERE ### $e->xact_begin; + my @payment_ids; # create payment records my $create_money_method = "create_money_" . $type; @@ -338,6 +339,8 @@ sub make_payments { $e, "$create_money_method failed", $payment, $cc_payload ); } + + push(@payment_ids, $payment->id); } my $evt = _update_patron_credit($e, $patron, $credit); @@ -360,7 +363,7 @@ sub make_payments { } $e->commit; - return 1; + return \@payment_ids; } sub _recording_failure { -- 2.11.0