flyerhzm / activemerchant_patch_for_china

A rails plugin to add an active_merchant patch for china online payment platform including alipay (支付宝), 99bill (快钱) and tenpay (财付通)
MIT License
305 stars 82 forks source link

Alipay::Notification 解析参数时,没有用CGI.unescape解码, 导致日期参数丢失时间部分 #9

Open edwardzhou opened 13 years ago

edwardzhou commented 13 years ago

ActiveMerchant::Billing::Integrations::Alipay::Notification

Take the posted data and move the relevant data into a hash

      def parse(post)
        @raw = post
        for line in post.split('&')
          key, value = _line.scan( %r{^(\w+)\=(._)$} ).flatten
          **params[key] = value**
        end
      end

应该改为跟 activemerchant的Notification一样。 _params[key] = CGI.unescape(value || '') _

对比过 activemerchant 的Notification.parse 发现其实Alipay::Notification.parse 完全可以删除掉。

flyerhzm commented 13 years ago

请fork,然后提交一个pull request给我吧