Module: Reapal::Form::BusinessAuthForm

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

Instance Method Summary collapse

Instance Method Details

#business_auth_form(flow_id, contracts, services, auth_limit, return_url, notify_url, tender_no = nil, busway = '01') ⇒ Hash

3.20 标的授权 (Form)

Parameters:

  • flow_id (String)

    业务订单号

  • contracts (String)

    用户协议号

  • services (String)

    授权服务 02一键投标 ,03 为一键还款 04 一键债转

  • auth_limit (String)

    授权期限日期 YYYYMMDD

  • return_url (String)

    回调 url

  • notify_url (String)

    通知 url

  • tender_no (String) (defaults to: nil)

    标的号,授权为一键还款时必填

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

    00:PC端;01:手机端;02:Pad端;03:其它

Returns:

  • (Hash)

    结果集

    • form_method

      • url

      • method

    • form_data

      • :merchant_id

      • :encryptkey

      • :data



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

def business_auth_form(flow_id, contracts, services, auth_limit,
                       return_url, notify_url, tender_no=nil, busway='01')

  service = 'reapal.trust.businessAuth'
  post_path = '/reagw/user/rest.htm'

  params = {
    orderNo: flow_id,
    contracts: contracts,
    services: services,
    busway: busway,
    authLimit: auth_limit,
    tenderNo: tender_no,
    returnUrl: return_url,
    notifyUrl: notify_url,
    remark: '',
    applyTime: Time.now.strftime('%Y-%m-%d %H:%M:%S')
  }

  get_form_data(service, params, post_path)
end