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 / +23 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
        $ok = 0;
90
91
        if ( ref($_) =~ /^Koha::Exceptions/ ) {
92
            $error = $_->description;
93
        }
94
        else {
95
            $_->rethrow;
96
        }
97
    };
98
80
    return {
99
    return {
81
        ok           => 1,
100
        ok           => $ok,
82
        pay_response => $pay_response
101
        pay_response => $pay_response,
102
        error        => $error,
83
    };
103
    };
84
}
104
}
85
105
(-)a/C4/SIP/Sip/MsgType.pm (-1 / +1 lines)
Lines 1194-1199 sub handle_fee_paid { Link Here
1194
    $resp .= add_field( FID_INST_ID,   $inst_id, $server );
1194
    $resp .= add_field( FID_INST_ID,   $inst_id, $server );
1195
    $resp .= add_field( FID_PATRON_ID, $patron_id, $server );
1195
    $resp .= add_field( FID_PATRON_ID, $patron_id, $server );
1196
    $resp .= maybe_add( FID_TRANSACTION_ID, $status->transaction_id, $server );
1196
    $resp .= maybe_add( FID_TRANSACTION_ID, $status->transaction_id, $server );
1197
    $resp .= maybe_add( FID_SCREEN_MSG,     $pay_result->{error}, $server );
1197
    $resp .= maybe_add( FID_SCREEN_MSG,     $status->screen_msg, $server );
1198
    $resp .= maybe_add( FID_SCREEN_MSG,     $status->screen_msg, $server );
1198
    $resp .= maybe_add( FID_PRINT_LINE,     $status->print_line, $server );
1199
    $resp .= maybe_add( FID_PRINT_LINE,     $status->print_line, $server );
1199
1200
1200
- 

Return to bug 33216