lib/freemium/gateways/brain_tree.rb
# Manually charges a card in SecureVault. Called automatically as part of manual billing process.
Manually charges a card in SecureVault. Called automatically as part of manual billing process.
Manually charges a card in SecureVault . Called automatically as part of manual billing process .
def charge(vault_id, amount)
        p = Post.new(URL, {
          :username => self.username,
          :password => self.password,
          :customer_vault_id => vault_id,
          :amount => sprintf("%.2f", amount.cents.to_f / 100)
        })
        p.commit
        return Freemium::Transaction.new(:billing_key => vault_id, :amount => amount, :success => p.response.success?)
      end
def charge ( vault_id , amount ) p = Post . new ( URL , { :username => self . username , :password => self . password , :customer_vault_id => vault_id , :amount => sprintf ( "%.2f" , amount . cents . to_f / 100 ) } ) p . commit return Freemium :: Transaction . new ( :billing_key => vault_id , :amount => amount , :success => p . response . success? ) end
Manually charges a card in SecureVault.
Manually charges a card in SecureVault .
vault_id
<not_specific>
amount
<not_specific>