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

(-)a/opac/opac-account-pay-paypal-return.pl (-5 / +4 lines)
Lines 93-102 if ( $response->is_success ) { Link Here
93
    if ( $params{ACK} eq "Success" ) {
93
    if ( $params{ACK} eq "Success" ) {
94
        $amount = $params{PAYMENTINFO_0_AMT};
94
        $amount = $params{PAYMENTINFO_0_AMT};
95
95
96
        my $accountlines_rs = Koha::Database->new()->schema()->resultset('Accountline');
96
        my $account = Koha::Account->new( { patron_id => $borrowernumber } );
97
        foreach my $accountlines_id ( @accountlines ) {
97
        foreach my $accountlines_id (@accountlines) {
98
            my $accountline = $accountlines_rs->find( $accountlines_id );
98
            my $line = Koha::Account::Lines->find($accountlines_id);
99
            makepayment( $accountlines_id, $borrowernumber, undef, $accountline->amountoutstanding, undef, undef, 'PayPal' );
99
            $account->pay( { lines => [$line], note => 'PayPal' } );
100
        }
100
        }
101
    }
101
    }
102
    else {
102
    else {
103
- 

Return to bug 15907