Class: ActiveMerchant::Billing::Integrations::PayuInPaisa::Notification

Inherits:
ActiveMerchant::Billing::Integrations::PayuIn::Notification show all
Defined in:
lib/active_merchant/billing/integrations/payu_in_paisa/notification.rb

Instance Attribute Summary

Attributes inherited from Notification

#params, #raw

Instance Method Summary collapse

Methods inherited from ActiveMerchant::Billing::Integrations::PayuIn::Notification

#account, #acknowledge, #amount_ok?, #checksum, #complete?, #currency, #customer_address, #customer_email, #customer_first_name, #customer_last_name, #customer_phone, #discount, #gross, #initialize, #invoice, #invoice_ok?, #message, #offer_description, #product_info, #status, #transaction_id, #transaction_status, #type, #user_defined

Methods inherited from Notification

#amount, #empty!, #gross, #gross_cents, #initialize, #status, #test?, #valid_sender?

Constructor Details

This class inherits a constructor from ActiveMerchant::Billing::Integrations::PayuIn::Notification

Instance Method Details

#checksum_ok?Boolean

Returns:

  • (Boolean)


10
11
12
13
14
15
16
17
18
# File 'lib/active_merchant/billing/integrations/payu_in_paisa/notification.rb', line 10

def checksum_ok?
  fields = user_defined.reverse.push( customer_email, customer_first_name, product_info, gross, invoice, :reverse => true )
  fields.unshift( transaction_status )
  unless PayuIn.checksum(@merchant_id, @secret_key, *fields ) == checksum
    @message = 'Return checksum not matching the data provided'
    return false
  end
  true
end

#item_idObject



6
7
8
# File 'lib/active_merchant/billing/integrations/payu_in_paisa/notification.rb', line 6

def item_id
  params['udf2']
end