Class: Minfraud::Components::Payment

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

Overview

Payment corresponds to the payment object of a minFraud request.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Enum

included

Methods inherited from Base

#to_json

Constructor Details

#initialize(params = {}) ⇒ Payment

Returns a new instance of Payment.

Parameters:

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

    Hash of parameters. Each key/value should correspond to one of the available attributes.



166
167
168
169
170
171
172
# File 'lib/minfraud/components/payment.rb', line 166

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

  validate
end

Instance Attribute Details

#decline_codeString?

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

Returns:

  • (String, nil)


162
163
164
# File 'lib/minfraud/components/payment.rb', line 162

def decline_code
  @decline_code
end

#processorSymbol?

The payment processor used for the transaction. The value is one listed as a valid value, as a symbol.

Returns:

  • (Symbol, nil)


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/minfraud/components/payment.rb', line 18

enum_accessor :processor, [
  :adyen,
  :affirm,
  :afterpay,
  :altapay,
  :amazon_payments,
  :american_express_payment_gateway,
  :authorizenet,
  :balanced,
  :beanstream,
  :bluepay,
  :bluesnap,
  :bpoint,
  :braintree,
  :cardpay,
  :cashfree,
  :ccavenue,
  :ccnow,
  :cetelem,
  :chase_paymentech,
  :checkout_com,
  :cielo,
  :collector,
  :commdoo,
  :compropago,
  :concept_payments,
  :conekta,
  :ct_payments,
  :cuentadigital,
  :curopayments,
  :cybersource,
  :dalenys,
  :dalpay,
  :datacash,
  :dibs,
  :digital_river,
  :dotpay,
  :ebs,
  :ecomm365,
  :ecommpay,
  :elavon,
  :emerchantpay,
  :epay,
  :eprocessing_network,
  :epx,
  :eway,
  :exact,
  :first_atlantic_commerce,
  :first_data,
  :g2a_pay,
  :global_payments,
  :gocardless,
  :heartland,
  :hipay,
  :ingenico,
  :interac,
  :internetsecure,
  :intuit_quickbooks_payments,
  :iugu,
  :klarna,
  :komoju,
  :lemon_way,
  :mastercard_payment_gateway,
  :mercadopago,
  :mercanet,
  :merchant_esolutions,
  :mirjeh,
  :mollie,
  :moneris_solutions,
  :nmi,
  :oceanpayment,
  :oney,
  :openpaymx,
  :optimal_payments,
  :orangepay,
  :other,
  :pacnet_services,
  :payeezy,
  :payfast,
  :paygate,
  :paylike,
  :payment_express,
  :paymentwall,
  :payone,
  :paypal,
  :payplus,
  :paysafecard,
  :paystation,
  :paytm,
  :paytrace,
  :paytrail,
  :payture,
  :payu,
  :payulatam,
  :payway,
  :payza,
  :pinpayments,
  :posconnect,
  :princeton_payment_solutions,
  :psigate,
  :qiwi,
  :quickpay,
  :raberil,
  :razorpay,
  :rede,
  :redpagos,
  :rewardspay,
  :sagepay,
  :securetrading,
  :simplify_commerce,
  :skrill,
  :smartcoin,
  :smartdebit,
  :solidtrust_pay,
  :sps_decidir,
  :stripe,
  :synapsefi,
  :systempay,
  :telerecargas,
  :towah,
  :transact_pro,
  :usa_epay,
  :vantiv,
  :verepay,
  :vericheck,
  :vindicia,
  :virtual_card_services,
  :vme,
  :vpos,
  :wirecard,
  :worldpay
]

#was_authorizedBoolean?

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

Returns:

  • (Boolean, nil)


156
157
158
# File 'lib/minfraud/components/payment.rb', line 156

def was_authorized
  @was_authorized
end