Sha256: 14bf65db31b2f771e896b9f61c39158b971db438b8eeec4e7d9656943ad257f6

Contents?: true

Size: 837 Bytes

Versions: 6

Compression:

Stored size: 837 Bytes

Contents

# coding: utf-8
module Reapal
  module Form
    module DataHelper

      # 跳转到富民 Form 类的 api,统一返回处理
      #
      # @param service [ String ] 富民的服务
      # @param params [ Hash ] 参数
      # @param post_path [ String ] post url
      #
      # @return [ Hash ] 结果集
      #   * form_method
      #     * url
      #     * method
      #   * form_data
      #     * :merchant_id
      #     * :encryptkey
      #     * :data
      #
      def get_form_data(service, params, post_path)
        Reapal.logger.info params

        request = Http.get_body(service, params, @config)

        {
          form_method: {
            :url => @config[:server_url] + post_path,
            :method => :post,
          },
          form_data: request
        }
      end

    end # DataHelper
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
reapal-0.18.0 lib/reapal/form/form_helper.rb
reapal-0.17.0 lib/reapal/form/form_helper.rb
reapal-0.16.0 lib/reapal/form/form_helper.rb
reapal-0.15.0 lib/reapal/form/form_helper.rb
reapal-0.14.0 lib/reapal/form/form_helper.rb
reapal-0.13.0 lib/reapal/form/form_helper.rb