5
6
7
8
9
10
11
12
13
14
15
16
17
|
# File 'app/controllers/hws/connectors/payouts_controller.rb', line 5
def callback
Hws::Connectors.logger.debug "===== Hws::Connectors::PayoutsController.callback - Payload: #{params.inspect} ====="
beneficiary = Hws::Connectors::Dto::AccountDetail
.new(name: params['beneficiary_name'], account_number: params['account_number'],
account_ifsc: params['account_ifsc'], note: params['note'])
response = Hws::Connectors::Dto::PayoutResponse
.new(reference_number: params['reference_number'], beneficiary: beneficiary, account_holder: params['account_holder'],
amount: params['amount'].to_f, payment_type: params['payment_type'], status: params['status'],
bank_ref_num: params['bank_ref_num'], txn_time: Time.strptime(params['txn_time'], '%Y-%m-%d %H:%M:%S'),
meta: params.as_json.slice(*HYPTO_META_RESPONSES))
render_response(response)
end
|