@@ -41,24 +41,24 @@ def self.call(response:)
4141 notifier . put_request ( direction : 'services' , path : url , params : parsed_response )
4242 rescue StandardError => e
4343 Rails . logger . error e
44- notifier . notify ( title : 'Error occur in callback handler' , error_message : "Error message #{ e } " )
44+ notifier . notify ( title : 'Error occur in callback handler' , error_message : "Error message #{ e } . path: #{ url } , params: #{ parsed_response } , class: Notify, method: call " )
4545 end
4646
4747 def define_for_deposit ( invoice , url )
4848 attributes = invoice . description . split ( ',' )
4949 domain_name , user_uuid , user_email = attributes . map { |attr | attr . split ( ' ' ) [ 1 ] }
5050
5151 params = {
52- domain_name : domain_name ,
53- user_uuid : user_uuid ,
54- user_email : user_email ,
52+ domain_name :,
53+ user_uuid :,
54+ user_email :,
5555 transaction_amount : invoice . transaction_amount . to_f ,
5656 invoice_number : invoice . invoice_number ,
5757 description : 'deposit' ,
5858 affiliation : 1
5959 }
6060
61- put_request ( direction : 'services' , path : url , params : params )
61+ put_request ( direction : 'services' , path : url , params :)
6262 end
6363
6464 def notify ( title :, error_message :)
@@ -71,7 +71,7 @@ def update_invoice_state(parsed_response:, invoice:)
7171 status = parsed_response [ :payment_state ] == SETTLED ? :paid : :failed
7272
7373 invoice . update ( payment_reference : parsed_response [ :payment_reference ] ,
74- status : status ,
74+ status :,
7575 transaction_time : parsed_response [ :transaction_time ] ,
7676 everypay_response : parsed_response )
7777 end
@@ -91,7 +91,7 @@ def invoice_numbers_from_multi_payment(invoice)
9191 end
9292
9393 def set_description_for_multiple_payment ( parent_invoice :, invoice_number :)
94- invoice = Invoice . find_by ( invoice_number : invoice_number )
94+ invoice = Invoice . find_by ( invoice_number :)
9595
9696 invoice . payment_reference = parent_invoice . payment_reference
9797 invoice . status = parent_invoice . status
0 commit comments