class ProductOrderPayment < ActiveRecord::Base
  belongs_to :product_order
  before_validation do
     self.verify
       
  end
  
  
  protected
  
  	def verify(size=16)
  		if !self.token
  			s = ""
  			size.times { s << (i = Kernel.rand(62); i += ((i < 10) ? 48 : ((i < 36) ? 55 : 61 ))).chr }
  			self.token = s
	    end
	  end
  
  
  
end
