Skip to content

Instantly share code, notes, and snippets.

@vsavkin
Created April 21, 2012 00:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vsavkin/2432901 to your computer and use it in GitHub Desktop.
Save vsavkin/2432901 to your computer and use it in GitHub Desktop.
Payment Service
module PaymentService
def self.process order, credit_card
with_transaction do
order.make_payment mask_card(credit_card)
make_remote_call credit_card, order.payment
end
end
...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment