Module: Reapal::Form::ComContractForm

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

Instance Method Summary collapse

Instance Method Details

#com_contract_form(flow_id, corp_name, identity_id, com_name, com_license, lic_start_date, lic_end_date, bank_code, user_type, email, return_url, notify_url, busway = '01', remark = '') ⇒ Hash

1.1 企业签约

Parameters:

  • flow_id (String)

    订单号

  • corp_name (String)

    法人代表姓名

  • identity_id (String)

    法人身份证号

  • com_name (String)

    企业名称

  • com_license (String)

    组织机构代码/社会征信号

  • lic_start_date (Time)

    企业组织机构证起始日

  • lic_end_date (Time)

    企业组织机构证截止日

  • bank_code (String)

    银行编码

  • user_type (String)

    注册类别 01:出借人 02:借款人 03:担保人 04:受托方

  • email (String)

    企业邮箱

  • return_url (String)

    回调 URL

  • notify_url (String)

    通知 URL

  • 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



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/reapal/form/com_contract_form.rb', line 31

def com_contract_form(flow_id, corp_name, identity_id, com_name, com_license,
                      lic_start_date, lic_end_date, bank_code,
                      user_type, email, return_url, notify_url,
                      busway='01', remark='')

  service = 'reapal.trust.comContract'
  post_path = '/agreement/agree.htm'

  params = {
    orderNo: flow_id,
    corpName: corp_name,
    corpIdentity: identity_id,
    comName: com_name,
    comLicense: com_license,
    licStartDate: lic_start_date.strftime("%Y%m%d"),
    licEndDate: lic_end_date.strftime("%Y%m%d"),
    bankCode: bank_code,
    userType: user_type,
    email: email,
    busway: busway,
    returnUrl: return_url,
    notifyUrl: notify_url,
    remark: remark,
    applyTime: Time.now.strftime('%Y-%m-%d %H:%M:%S'),
  }

  get_form_data(service, params, post_path)
end