Module: Reapal::Form::RefundGuarantPaymentForm

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

Instance Method Summary collapse

Instance Method Details

#refund_guarant_payment_form(flow_id, tender_no, amount, fee_amount, payee_contract, return_url, notify_url, busway = '01') ⇒ Hash

3.16 借款人还代偿款

Parameters:

  • flow_id (String)

    还款订单号

  • tender_no (String)

    代偿还款标的号

  • amount (Bigdecimal)

    金额

  • fee_amount (Bigdecimal)

    预期手续费

  • payee_contract (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



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

def refund_guarant_payment_form(flow_id, tender_no, amount,
                                fee_amount, payee_contract,
                                return_url, notify_url, busway='01')
  service = 'reapal.trust.refundGuarantPayment'
  post_path = '/tender/rest.htm'

  params = {
    orderNo: flow_id,
    tenderNo: tender_no,
    amount: amount,
    feeAmount: fee_amount,
    payeeContract: payee_contract,
    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