Skip to content

Instantly share code, notes, and snippets.

@sprite2005
Created April 3, 2009 17:45
Show Gist options
  • Save sprite2005/89854 to your computer and use it in GitHub Desktop.
Save sprite2005/89854 to your computer and use it in GitHub Desktop.
def begin_phone_transaction(vendor_user, client_user)
t = new
t.description = 'Phone Transaction'
t.state = 'progressing'
t.sender_user_transactions.build :user => client_user, :amount => Money.new(0, 'USD')
t.receiver_user_transactions.build :user => vendor_user, :amount => Money.new(0, 'USD')
t.receiver_user_transactions.build :user => SpecialUser.vipwithme_billing, :amount => Money.new(0, 'USD')
t.save!
t
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment