Module: Reapal::Form::MobileModifyForm

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

Instance Method Summary collapse

Instance Method Details

#mobile_modify_form(contract, new_phone, return_url, notify_url, busway = '01') ⇒ Hash

1.3 签约手机号修改

Parameters:

  • contract (String)

    用户协议

  • new_phone (String)

    新手机号

  • return_url (String)

    回调 url

  • notify_url (String)

    通知 url

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

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

Returns:

  • (Hash)

    结果集

    • :form_method

      • :method

      • :url

    • :form_data

      • :merchant_id

      • :encryptkey

      • :data



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/reapal/form/mobile_modify_form.rb', line 24

def mobile_modify_form(contract, new_phone, return_url, notify_url, busway='01')
  service = 'reapal.trust.mobileModify'
  post_path = '/user/rest.htm'

  params = {
    contracts: contract,
    mobile: new_phone,
    busway: busway,
    returnUrl: return_url,
    notifyUrl: notify_url,
    applyTime: Time.now.strftime('%Y-%m-%d %H:%M:%S'),
  }

  get_form_data(service, params, post_path)
end