| 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( | 
            
              |  |  | 100 |                 { | 
            
              | 101 |                     amount => $amount, | 
            
              | 102 |                     lines  => [$line], | 
            
              | 103 |                     note   => 'PayPal' | 
            
              | 104 |                 } | 
            
              | 105 |             ); | 
        
          | 100 |         } | 106 |         } | 
        
          | 101 |     } | 107 |     } | 
        
          | 102 |     else { | 108 |     else { | 
            
              | 103 | -  |  |  |