Module: JaslTenpay::Notify
- Defined in:
- lib/jasl_tenpay/notify.rb
Constant Summary collapse
- GATEWAY =
'https://gw.tenpay.com/gateway/simpleverifynotifyid.xml'
- SUCCESS_STR =
'<retcode>0</retcode>'
Class Method Summary collapse
Class Method Details
.verify?(params) ⇒ Boolean
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/jasl_tenpay/notify.rb', line 6 def self.verify?(params) return false unless Sign.verify?(params) params = { 'input_charset' => 'UTF-8', 'partner' => JaslTenpay.pid, 'notify_id' => CGI.escape(params[:notify_id].to_s) } open("#{GATEWAY}?#{Utils.make_query_string(params)}").read.include?(SUCCESS_STR) end |