Module: Reapal::Api::Money::DepositApplyApi

Defined in:
lib/reapal/api/money/deposit_apply_api.rb

Instance Method Summary collapse

Instance Method Details

#deposit_apply_api(flow_id, contracts, bank_card, true_name, identity_id, phone, amount, charge, terminal_info, member_ip, notify_url, cert_type = '01', currency = 'cny', bus_way = '01', remark = '') ⇒ Hash

2.2 快捷充值签约(API)

Parameters:

  • flow_id (String)

    订单号

  • contracts (String)

    用户协议号

  • bank_card (String)

    银行卡卡号

  • true_name (String)

    持卡人姓名

  • identity_id (String)

    身份证号

  • phone (String)

    用户手机(注意是银行卡预留手机号)

  • amount (BigDecimal)

    交易金额

  • charge (BigDecimal)

    手续费

  • terminal_info (String)

    终端信息(手机IMEI地址、MAC地址、UUID)

  • member_ip (String)

    用户IP

  • notify_url (String)

    通知URL

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

    证件类型 (暂时只支持身份证:01)

  • currency (String) (defaults to: 'cny')

    交易币种(默认人民币(仅支持人民币cny))

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

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

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

    备注

Returns:

  • (Hash)

    结果集

    • :result [String] 业务结果:‘S/F/P’

    • :request_params [Hash] 请求参数

    • :response [Object] 请求返回对象

    • :error_code [String] 错误代号

    • :error_msg [String] 错误信息

    • :data: 具体业务返回信息

      • :orderNO [String] 充值订单号

      • :bindId [String] 绑卡ID

      • :certificate [String] 招商银行标识(有此标识表示充值卡为招商银行,返回值为0,

      • :resultCode [String] 结果代码

      • :resultMsg [String] 结果描述



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/reapal/api/money/deposit_apply_api.rb', line 41

def deposit_apply_api(flow_id, contracts, bank_card, true_name, identity_id,
                      phone, amount, charge, terminal_info, member_ip,
                      notify_url, cert_type = '01', currency = 'cny', bus_way = '01', remark = '')

  service = 'reapal.trust.depositApplyAPI'
  post_path = '/reagw/service/depwit.htm'

  params = {
    orderNo: flow_id,
    contracts: contracts,
    bankCard: bank_card,
    userName: true_name,
    certType: cert_type,
    userIdentity: identity_id,
    userMobile: phone,
    currency: currency,
    amount: amount,
    charge: charge,
    busway: bus_way,
    terminalInfo: terminal_info,
    memberIp: member_ip,
    notifyUrl: notify_url,
    remark: remark,
    applyTime: Time.now.strftime('%Y-%m-%d %H:%M:%S'),
  }

  operate_post(:operate, service, params, post_path, Http::ErrorCode.deposit_apply_api, ['0000'], '2.0')
end