Sha256: 5cf914dec7807a7067e50d059ff7452ac892d729d19e2087382ca5ad7b5748c7

Contents?: true

Size: 490 Bytes

Versions: 2

Compression:

Stored size: 490 Bytes

Contents

require 'models/tenpay'

module Magpie

  class Tenpay
    include Utils

    def initialize(app, pay_gateway = "http://service.tenpay.com/cgi-bin/v3.0/payservice.cgi")
      @app = app
      @pay_gateway = pay_gateway
      @red_xpath = "//div[@id='error-info']"
      @error_xpath = "//td[@class='font_14']"
    end

    def call(env)
      status, header, body, req, red_text = dig env
      [status, header, get_xml_body(env, TenpayModel.new(req.params), red_text)]
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
magpie-0.8.8.1 lib/middles/tenpay.rb
magpie-0.8.8 lib/middles/tenpay.rb