Sha256: 93d818c1dbb8969b1be3f8d88130dfd788581104299f5c2eec5455dc390023f3

Contents?: true

Size: 735 Bytes

Versions: 4

Compression:

Stored size: 735 Bytes

Contents

module Paydunya
  module Checkout
    class Core
      include Paydunya::Utilities
      attr_accessor :status, :response_text, :response_code, :transaction_id, :description, :token, :result

      def push_results(result={})
        @result = 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 = Paydunya::SUCCESS : @status = Paydunya::FAIL
      end
    end
  end
end

%w(checkout/redirect_invoice
  checkout/onsite_invoice
  checkout/store
).each do |lib|
  require File.join(File.dirname(__FILE__), lib)
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
paydunya-1.0.5 lib/paydunya/checkout.rb
paydunya-1.0.4 lib/paydunya/checkout.rb
paydunya-1.0.3 lib/paydunya/checkout.rb
paydunya-1.0.2 lib/paydunya/checkout.rb