Module: Reapal::Form::TenderInvestForm

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

Instance Method Summary collapse

Instance Method Details

#tender_invest_form(flow_id, tender_no, amount, invest_contract, return_url, notify_url, coupon_amt = '', busway = '01', remark = '') ⇒ Hash

3.4 投标

Parameters:

  • flow_id (String)

    订单号

  • tender_no (String)

    标的号

  • amount (Number)

    金额

  • invest_contract (String)

    投资方协议号

  • return_url (String)

    回调 url

  • notify_url (String)

    通知 url

  • coupon_amt (Number) (defaults to: '')

    红包抵用券

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

    00:PC端页面 01:移动端H5

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

    备注

Returns:

  • (Hash)

    结果集

    • :form_method

      • :method

      • :url

    • :form_data

      • :merchant_id

      • :encryptkey

      • :data



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/reapal/form/tender_invest_form.rb', line 26

def tender_invest_form(flow_id, tender_no,
                       amount, invest_contract,
                       return_url, notify_url,
                       coupon_amt='', busway='01', remark='')
  service = 'reapal.trust.tenderInvest'
  post_path = '/tender/rest.htm'

  params = {
    orderNo: flow_id,
    tenderNo: tender_no,
    amount: amount,
    investContracts: invest_contract,
    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