Class: Minfraud::Components::Payment

Inherits:
Base
  • Object
show all
Includes:
Enum
Defined in:
lib/minfraud/components/payment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Enum

included

Methods inherited from Base

#to_json

Constructor Details

#initialize(params = {}) ⇒ Minfraud::Components::Payment

Creates Minfraud::Components::Payment instance

Parameters:

  • params (Hash) (defaults to: {})

    hash of parameters



33
34
35
36
37
# File 'lib/minfraud/components/payment.rb', line 33

def initialize(params = {})
  @was_authorized = params[:was_authorized]
  @decline_code   = params[:decline_code]
  self.processor  = params[:processor]
end

Instance Attribute Details

#decline_codeString

Returns The decline code as provided by your payment processor. If the transaction was not declined, do not include this field.

Returns:

  • (String)

    The decline code as provided by your payment processor. If the transaction was not declined, do not include this field



28
29
30
# File 'lib/minfraud/components/payment.rb', line 28

def decline_code
  @decline_code
end

#processorString

Returns The payment processor used for the transaction.

Returns:

  • (String)

    The payment processor used for the transaction



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/minfraud/components/payment.rb', line 7

enum_accessor :processor, [
  :adyen, :altapay, :amazon_payments, :authorizenet, :balanced, :beanstream,
  :bluepay, :braintree, :ccnow, :chase_paymentech, :cielo, :collector, :compropago,
  :concept_payments, :conekta, :cuentadigital, :dalpay, :dibs, :digital_river, :ecomm365,
  :elavon, :epay, :eprocessing_network, :eway, :first_data, :global_payments, :ingenico,
  :internetsecure, :intuit_quickbooks_payments, :iugu, :mastercard_payment_gateway,
  :mercadopago, :merchant_esolutions, :mirjeh, :mollie, :moneris_solutions, :nmi,
  :openpaymx, :optimal_payments, :orangepay, :other, :pacnet_services, :payfast,
  :paygate, :payone, :paypal, :payplus, :paystation, :paytrace, :paytrail, :payture,
  :payu, :payulatam, :pinpayments, :princeton_payment_solutions, :psigate, :qiwi,
  :quickpay, :raberil, :rede, :redpagos, :rewardspay, :sagepay, :simplify_commerce,
  :skrill, :smartcoin, :sps_decidir, :stripe, :telerecargas, :towah, :usa_epay,
  :verepay, :vindicia, :virtual_card_services, :vme, :worldpay
]

#was_authorizedBoolean

Returns The authorization outcome from the payment processor. If the transaction has not yet been approved or denied, do not include this field.

Returns:

  • (Boolean)

    The authorization outcome from the payment processor. If the transaction has not yet been approved or denied, do not include this field



24
25
26
# File 'lib/minfraud/components/payment.rb', line 24

def was_authorized
  @was_authorized
end