View | Details | Raw Unified | Return to bug 33216
Collapse All | Expand All

(-)a/C4/SIP/ILS.pm (-1 / +2 lines)
Lines 310-316 sub pay_fee { Link Here
310
310
311
    return {
311
    return {
312
        status       => $trans,
312
        status       => $trans,
313
        pay_response => $trans_result->{pay_response}
313
        pay_response => $trans_result->{pay_response},
314
        error        => $trans_result->{error},
314
    };
315
    };
315
}
316
}
316
317
(-)a/C4/SIP/ILS/Transaction/FeePayment.pm (-3 / +22 lines)
Lines 20-25 use strict; Link Here
20
# You should have received a copy of the GNU General Public License
20
# You should have received a copy of the GNU General Public License
21
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
# along with Koha; if not, see <http://www.gnu.org/licenses>.
22
22
23
use Try::Tiny;
24
23
use Koha::Account;
25
use Koha::Account;
24
use Koha::Account::Lines;
26
use Koha::Account::Lines;
25
27
Lines 76-85 sub pay { Link Here
76
            };
78
            };
77
        }
79
        }
78
    }
80
    }
79
    my $pay_response = $account->pay($pay_options);
81
82
    my $ok = 1;
83
    my $pay_response;
84
    my $error;
85
    try {
86
        $pay_response = $account->pay($pay_options);
87
    }
88
    catch {
89
        if ( ref($_) =~ /^Koha::Exceptions/ ) {
90
            $ok    = 0;
91
            $error = $_->description;
92
        }
93
        else {
94
            $_->rethrow;
95
        }
96
    };
97
80
    return {
98
    return {
81
        ok           => 1,
99
        ok           => $ok,
82
        pay_response => $pay_response
100
        pay_response => $pay_response,
101
        error        => $error,
83
    };
102
    };
84
}
103
}
85
104
(-)a/C4/SIP/Sip/MsgType.pm (-1 / +2 lines)
Lines 1153-1158 sub handle_fee_paid { Link Here
1153
    $status = $pay_result->{status};
1153
    $status = $pay_result->{status};
1154
    my $pay_response = $pay_result->{pay_response};
1154
    my $pay_response = $pay_result->{pay_response};
1155
1155
1156
    $resp .= maybe_add( FID_SCREEN_MSG, $pay_result->{error}, $server ) if $pay_result->{error};
1157
1156
    my $failmap = {
1158
    my $failmap = {
1157
        "no_item" => "No matching item could be found",
1159
        "no_item" => "No matching item could be found",
1158
        "no_checkout" => "Item is not checked out",
1160
        "no_checkout" => "Item is not checked out",
1159
- 

Return to bug 33216