lib/freemium/manual_billing.rb
# charges this subscription.
# assumes, of course, that this module is mixed in to the Subscription model
charges this subscription.
assumes, of course, that this module is mixed in to the Subscription model
charges this subscription . assumes of course that this module is mixed in to the Subscription model
def charge!
      self.class.transaction do
        transaction = Freemium.gateway.charge(billing_key, subscription_plan.rate)
        Freemium.activity_log[self] << transaction if Freemium.log?
        transaction.success? ? receive_payment!(transaction.amount) : expire_after_grace!
      end
    end
def charge! self . class . transaction do transaction = Freemium . gateway . charge ( billing_key , subscription_plan . rate ) Freemium . activity_log [ self ] << transaction if Freemium . log? transaction . success? ? receive_payment! ( transaction . amount ) : expire_after_grace! end end
charges this subscription.
charges this subscription .
# attempt to bill (use gateway)