Module: Alipay::Wap::Notify

Defined in:
lib/alipay/wap/notify.rb

Class Method Summary collapse

Class Method Details

.verify?(params, options = {}) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
7
8
9
10
# File 'lib/alipay/wap/notify.rb', line 4

def self.verify?(params, options = {})
  params = Utils.stringify_keys(params)
  pid = options[:pid] || Alipay.pid
  notify_id = params['notify_data'].scan(/\<notify_id\>(.*)\<\/notify_id\>/).flatten.first

  Sign.verify?(params, options) && ::Alipay::Notify.verify_notify_id?(pid, notify_id)
end