我认为有必要，我休息一下去重构，但是怎么测试alipay的接口呢？

On 2013-8-12, at 下午4:55, Ian Yang <notifications@github.com> wrote:

> In app/models/event_order.rb:
> 
> > @@ -19,7 +20,14 @@ def paid?
> >      self.status.to_sym == :paid
> >    end
> >  
> > -  def pay(trade_no)
> > -    self.update_attributes status: 'paid', trade_no: trade_no if pending?
> > +  def pay(trade_no = nil)
> > +    if pending? && (free? || trade_no.present?)
> > +      assign_attributes status: 'paid', trade_no: trade_no, paid_at: Time.zone.now
> alipay 的返回结果需不需要存下来 作 trouble shooting?
> 
> —
> Reply to this email directly or view it on GitHub.
>