Sha256: 280a6d2ec665be7e9cb8479bac2443f9b2dd9e34f596e14353a94e190e878a09

Contents?: true

Size: 1.15 KB

Versions: 2

Compression:

Stored size: 1.15 KB

Contents

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    module Integrations #:nodoc:
      module PayDollar
        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

2 entries across 2 versions & 1 rubygems

Version Path
yetanothernguyen-activemerchant-1.21.2 lib/active_merchant/billing/integrations/pay_dollar/return.rb
yetanothernguyen-activemerchant-1.21.1 lib/active_merchant/billing/integrations/pay_dollar/return.rb