Sha256: 67d4fbbf35c5635423d72a6bd1fce219858bdb56351b187612ed2b9aed67d5db

Contents?: true

Size: 494 Bytes

Versions: 2

Compression:

Stored size: 494 Bytes

Contents

# -*- coding: utf-8 -*-
require 'models/alipay'

module Magpie

  class Alipay
    include Utils

    def initialize(app, pay_gateway = "https://www.alipay.com/cooperate/gateway.do")
      @app = app
      @pay_gateway = pay_gateway
      @red_xpath = "//div[@id='Info']/div[@class='ErrorInfo']/div[@class='Todo']"
    end

    def call(env)
      status, header, body, req, red_text = dig env
      [status, header, get_xml_body(env, AlipayModel.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/alipay.rb
magpie-0.8.8 lib/middles/alipay.rb