Sha256: 2b8fba4095466b5b735446c0dbb63052809510c26e4e59fc600cd00177d42658
Contents?: true
Size: 743 Bytes
Versions: 2
Compression:
Stored size: 743 Bytes
Contents
module MPower class DirectCard < MPower::Checkout::Core attr_accessor :unity_transaction_id def charge(amount,card_details={}) payload = { :card_name => card_details[:card_name], :card_number => card_details[:card_number], :card_cvc => card_details[:card_cvc], :exp_month => card_details[:exp_month], :exp_year => card_details[:exp_year], :amount => amount } result = http_json_request(MPower::Setup.direct_card_charge_base_url,payload) if result["response_code"] == "00" push_results(result) @unity_transaction_id = result["unity_transaction_id"] true else push_results(result) false end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mpower-1.2.2 | lib/mpower/direct_card.rb |
mpower-1.2.1 | lib/mpower/direct_card.rb |