Exemple #1
0
 def POST(self):
     try:
         data = web.data()
         UpmpHandler.notify(data)
         web.header('Content-Type', 'text/html')
         raise web.OK('success')
     except InvalidMerchantException:
         raise web.BadRequest('Invalid merchant')
     except InvalidNotifyException:
         raise web.BadRequest('Notify fail')
     except InvalidContentTypeException:
         raise web.BadRequest('Invalid content type')
     except Exception, e:
         print e
         raise web.OK('success')
Exemple #2
0
 def POST(self):
     try:
         data = web.data()
         UpmpHandler.notify(data)
         web.header('Content-Type', 'text/html')
         raise web.OK('success')
     except InvalidMerchantException:
         raise web.BadRequest('Invalid merchant')
     except InvalidNotifyException:
         raise web.BadRequest('Notify fail')
     except InvalidContentTypeException:
         raise web.BadRequest('Invalid content type')
     except Exception, e:
         print e
         raise web.OK('success')