Module: Reapal::Form::TenderRefundForm

Defined in:
lib/reapal/form/tender_refund_form.rb

Instance Method Summary collapse

Instance Method Details

#tender_refund_form(flow_id, tender_no, debit_contracts, debit_details, periods, return_url, notify_url, fee_details = [], defray_details = [], busway = '01', remark = '') ⇒ Hash

还款

Parameters:

  • flow_id (String)

    还款订单号

  • tender_no (String)

    商户系统标的的标号

  • debit_contracts (String)

    借款方协议号

  • debit_details (Array)

    借款方还款明细

    • :seriaNo [String] 还款流水号

    • :payeeContracts [String] 收款方协议号

    • :tradeAmount [Number] 还款总金额

    • :feeAmount [Number] 还款手续费

    • :defAmount [Number] 还款罚息

    • :amount [Number] 还款本金

    • :intAmt [Number] 还款利息

    • :remark [String] 备注

  • periods (Integer)

    还款期数

  • return_url (String)

    回调 url

  • notify_url (String)

    通知 url

  • fee_details (Array) (defaults to: [])

    手续费分账明细

    • :seriaNo [String] 还款分账流水号

    • :payeeContracts [String] 收款方协议号,只能是平台

    • :feeType [String] 手续费类型 01 平台收借款方手续费,不能大于标的备案的手续费 02 罚息,每种类型只能有一条记录

    • :amount [String] 金额

    • :remark [String] 备注

  • defray_details (Array) (defaults to: [])

    担保方分账明细

    • :seriaNo [String] 还款流水号

    • :payeeContracts [String] 担保方协议号

    • :amount [String] 金额

    • :remark [String] 备注

  • busway (String) (defaults to: '01')

    设备通道 00:PC端;01:手机端;02:Pad端;03:其它

  • remark (String) (defaults to: '')

    备注

Returns:

  • (Hash)

    结果集

    • :form_method

      • :method

      • :url

    • :form_data

      • :merchant_id

      • :encryptkey

      • :data



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/reapal/form/tender_refund_form.rb', line 47

def tender_refund_form(flow_id,
                       tender_no,
                       debit_contracts,
                       debit_details,
                       periods,
                       return_url,
                       notify_url,
                       fee_details = [],
                       defray_details = [],
                       busway = '01',
                       remark = '')
  service = 'reapal.trust.tenderRefund'
  post_path = '/tender/rest.htm'

  params = {
    orderNo: flow_id,
    tenderNo: tender_no,
    debitContracts: debit_contracts,
    debitDetails: debit_details,
    feeDetails: fee_details,
    defrayDetails: defray_details,
    periods: periods,
    returnUrl: return_url,
    notifyUrl: notify_url,
    busway: busway,
    remark: remark,
    applyTime: Time.now.strftime('%Y-%m-%d %H:%M:%S')
  }

  get_form_data(service, params, post_path)
end