Method: Magpie::Snake#order_pay

Defined in:
lib/middles/snake.rb

#order_payObject



74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/middles/snake.rb', line 74

def order_pay
  return "支付失败, 缺少足够的参数" if @req.params.blank?
  case @req.params["notify_kind"]
  when "alipay", "chinabank"
    notify_res = send_notify("POST", @req.params["notify_url"], query_to_hash(@req.params["notify"]))
    method = "POST"
  when "tenpay"
    notify_res = send_notify("GET", @req.params["notify_url"], @req.params["notify"])
    method = "GET"
  end
  log_notify(method, @req.params["notify_url"], query_to_hash(@req.params["notify"]), notify_res)
  notify_res
end