Sha256: 8b65f0ecbd2b03b3da99d1160e9d94269bad253119a554200418f29485d666aa

Contents?: true

Size: 1.51 KB

Versions: 20

Compression:

Stored size: 1.51 KB

Contents

# coding: utf-8
module RockFintech
  module Api
    module Money
      module BankRecharge
        # 网关充值
        #
        # @return [ Hash ] 结果集
        #   * :result [String] "S"/"F"/"P"
        #   * :request_params [Hash] 请求参数
        #   * :response [Object] 请求返回对象
        #   * :code [String] 结果代码
        #   * :msg [String] 结果信息
        #   * :data: 具体业务返回信息
        #       * :url [String] 支付 url
        #       * :order_no [String] 订单号
        #       * :amount [Number] 金额
        #
        def bank_recharge(card_no, bank_type, callback_url, customer_no, redirect_url,
                          product_name, product_detail, order_no, bank_name, bank_id_no, amount,
                          devise='000001', remark='')
          service = 'bank_recharge'

          params = {
            card_no: card_no,
            bank_type: bank_type,
            callback_url: callback_url,
            customer_no: customer_no,
            redirect_url: redirect_url,
            product_name: product_name,
            product_detail: product_detail,
            order_no: order_no,
            bank_name: bank_name,
            bank_id_no: bank_id_no,
            amount: amount,
            client: devise,
            custom: remark,
          }

          res = operate_post(:operate, service, params, Http::ErrorCode.bank_recharge, ['RD000000'])

          RockFintech.logger.info res

          res
        end

      end # module
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
rock_fintech-0.19.0 lib/rock_fintech/api/money/bank_recharge.rb
rock_fintech-0.18.4 lib/rock_fintech/api/money/bank_recharge.rb
rock_fintech-0.18.1 lib/rock_fintech/api/money/bank_recharge.rb
rock_fintech-0.17.0 lib/rock_fintech/api/money/bank_recharge.rb
rock_fintech-0.16.0 lib/rock_fintech/api/money/bank_recharge.rb
rock_fintech-0.15.0 lib/rock_fintech/api/money/bank_recharge.rb
rock_fintech-0.14.0 lib/rock_fintech/api/money/bank_recharge.rb
rock_fintech-0.13.0 lib/rock_fintech/api/money/bank_recharge.rb
rock_fintech-0.12.0 lib/rock_fintech/api/money/bank_recharge.rb
rock_fintech-0.11.0 lib/rock_fintech/api/money/bank_recharge.rb
rock_fintech-0.10.0 lib/rock_fintech/api/money/bank_recharge.rb
rock_fintech-0.9.0 lib/rock_fintech/api/money/bank_recharge.rb
rock_fintech-0.8.0 lib/rock_fintech/api/money/bank_recharge.rb
rock_fintech-0.7.0 lib/rock_fintech/api/money/bank_recharge.rb
rock_fintech-0.6.0 lib/rock_fintech/api/money/bank_recharge.rb
rock_fintech-0.5.0 lib/rock_fintech/api/money/bank_recharge.rb
rock_fintech-0.4.0 lib/rock_fintech/api/money/bank_recharge.rb
rock_fintech-0.3.0 lib/rock_fintech/api/money/bank_recharge.rb
rock_fintech-0.2.0 lib/rock_fintech/api/money/bank_recharge.rb
rock_fintech-0.1.0 lib/rock_fintech/api/money/bank_recharge.rb