Commit cf6cd855e8d416ab922e47d16161ac77c2e61fc6

Authored by vkill
Committed by GitHub
1 parent c4aac313
Exists in master

Update README.md

Showing 1 changed file with 4 additions and 4 deletions   Show diff stats
README.md
... ... @@ -226,16 +226,16 @@ A simple example of processing notify for Grape v1.2.2 .
226 226 gem 'multi_xml'
227 227  
228 228 # config/routes.rb
229   -mount Wechat::Api => '/notify'
  229 +mount WechatPay::Api => '/'
230 230  
231   -# app/api/wechat/api.rb
232   -module Wechat
  231 +# app/api/wechat_pay/api.rb
  232 +module WechatPay
233 233 class Api < Grape::API
234 234 content_type :xml, 'text/xml'
235 235 format :xml
236 236 formatter :xml, lambda { |object, env| object.to_xml(root: 'xml', dasherize: false) }
237 237  
238   - post "" do
  238 + post "notify" do
239 239 result = params["xml"]
240 240 if WxPay::Sign.verify?(result)
241 241 # find your order and process the post-paid logic.
... ...