Sha256: a78ca364e228c2aec5fffa61be4b5da0b340f42b4f49162e0148c2981413ea37

Contents?: true

Size: 1.14 KB

Versions: 4

Compression:

Stored size: 1.14 KB

Contents

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    module Integrations #:nodoc:
      module Migs
        class Return < ActiveMerchant::Billing::Integrations::Return
        	def success?
            acknowledge && params['vpc_TxnResponseCode'] == '0'
          end 

          def item_id
            params['vpc_MerchTxnRef']
          end

          def transaction_no
            params['vpc_TransactionNo']
          end

          def authorize_id
            params['vpc_AuthorizeId']
          end

          def receipt_no
            params['vpc_ReceiptNo']
          end

          def payer_card
            params['vpc_Card']
          end

          def order
            params['vpc_OrderInfo']
          end
         
          def message
            params['vpc_Message']
          end

          def response_code
            params['vpc_TxnResponseCode']
          end

          def acknowledge
            signature == params['vpc_SecureHash']
          end

          def signature
            unescape_params = params.map
            Helper::sign(@options[:credential2], params)
          end
	      end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
yetanothernguyen-activemerchant-1.21.2 lib/active_merchant/billing/integrations/migs/return.rb
yetanothernguyen-activemerchant-1.21.1 lib/active_merchant/billing/integrations/migs/return.rb
yetanothernguyen-activemerchant-1.21.0 lib/active_merchant/billing/integrations/migs/return.rb
yetanothernguyen-activemerchant-1.16.0 lib/active_merchant/billing/integrations/migs/return.rb