lib/mpower/checkout.rb in mpower-1.2.0 vs lib/mpower/checkout.rb in mpower-1.2.1

- old
+ new

@@ -1,10 +1,18 @@ module MPower module Checkout class Core include MPower::Utilities + attr_accessor :status, :response_text, :response_code, :transaction_id, :description, :token - attr_accessor :status, :response_text, :response_code, :token + def push_results(result={}) + @transaction_id = result["transaction_id"] + @description = result["description"] + @response_code = result["response_code"] + @response_text = result["response_text"] + @token = result["token"] + @response_code == "00" ? @status = MPower::SUCCESS : @status = MPower::FAIL + end end end end %w(checkout/redirect_invoice \ No newline at end of file