Class: ActiveMerchant::Billing::Integrations::PayDollar::Return

Inherits:
Return
  • Object
show all
Defined in:
lib/active_merchant/billing/integrations/pay_dollar/return.rb

Instance Attribute Summary

Attributes inherited from Return

#notification, #params

Instance Method Summary collapse

Methods inherited from Return

#cancelled?, #initialize, #parse

Constructor Details

This class inherits a constructor from ActiveMerchant::Billing::Integrations::Return

Instance Method Details

#acknowledgeObject



42
43
44
# File 'lib/active_merchant/billing/integrations/pay_dollar/return.rb', line 42

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

#authorize_idObject



18
19
20
# File 'lib/active_merchant/billing/integrations/pay_dollar/return.rb', line 18

def authorize_id
  params['vpc_AuthorizeId']
end

#item_idObject



10
11
12
# File 'lib/active_merchant/billing/integrations/pay_dollar/return.rb', line 10

def item_id
  params['vpc_MerchTxnRef']
end

#messageObject



34
35
36
# File 'lib/active_merchant/billing/integrations/pay_dollar/return.rb', line 34

def message
  params['vpc_Message']
end

#orderObject



30
31
32
# File 'lib/active_merchant/billing/integrations/pay_dollar/return.rb', line 30

def order
  params['vpc_OrderInfo']
end

#payer_cardObject



26
27
28
# File 'lib/active_merchant/billing/integrations/pay_dollar/return.rb', line 26

def payer_card
  params['vpc_Card']
end

#receipt_noObject



22
23
24
# File 'lib/active_merchant/billing/integrations/pay_dollar/return.rb', line 22

def receipt_no
  params['vpc_ReceiptNo']
end

#response_codeObject



38
39
40
# File 'lib/active_merchant/billing/integrations/pay_dollar/return.rb', line 38

def response_code
  params['vpc_TxnResponseCode']
end

#signatureObject



46
47
48
49
# File 'lib/active_merchant/billing/integrations/pay_dollar/return.rb', line 46

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

#success?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/active_merchant/billing/integrations/pay_dollar/return.rb', line 6

def success?
  acknowledge && params['vpc_TxnResponseCode'] == '0'
end

#transaction_noObject



14
15
16
# File 'lib/active_merchant/billing/integrations/pay_dollar/return.rb', line 14

def transaction_no
  params['vpc_TransactionNo']
end