Created
July 7, 2009 13:10
-
-
Save jamescook/142064 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Card.transaction do | |
#TODO | |
if @card.participating_in_top_up_program? # How do we store this? | |
top_up_amount = (options[:available_balance] - options[:transaction_amount]).abs | |
# ... magic step where we record the top up/ do special stuff. Does it need to show up in load reports? A different report? | |
result.success! | |
return {:pan => options[:account_number], :status => "00", :credit_advance => top_up_amount} | |
else | |
result.success! | |
return {:pan => options[:account_number], :status => "51", :credit_advance => 0.00} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment