Last active
March 22, 2016 14:26
-
-
Save paulcook/007b5d484e7aa17946e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def save_card | |
# Stubbed method on the api wrapper | |
response = Api::save_card(card_info) | |
if response.success? | |
# do something because it was saved | |
else | |
# let user know it wasnt saved | |
end | |
end | |
def charge_card | |
# Stubbed method on the api wrapper | |
response = Api::charge_card(amount, customer_id, etc) | |
if response.success? | |
# yeah! we got the money and they bought something | |
else | |
# Failed to charge card...uh oh! | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment