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.



192
193
194
195
196
197
198
# File 'lib/minfraud/components/payment.rb', line 192

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)


188
189
190
# File 'lib/minfraud/components/payment.rb', line 188

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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# File 'lib/minfraud/components/payment.rb', line 18

enum_accessor :processor, %i[
  adyen
  affirm
  afterpay
  altapay
  amazon_payments
  american_express_payment_gateway
  apple_pay
  aps_payments
  authorizenet
  balanced
  beanstream
  bluepay
  bluesnap
  boacompra
  boku
  bpoint
  braintree
  cardknox
  cardpay
  cashfree
  ccavenue
  ccnow
  cetelem
  chase_paymentech
  checkout_com
  cielo
  collector
  commdoo
  compropago
  concept_payments
  conekta
  coregateway
  creditguard
  credorax
  ct_payments
  cuentadigital
  curopayments
  cybersource
  dalenys
  dalpay
  datacap
  datacash
  dibs
  digital_river
  dlocal
  dotpay
  ebs
  ecomm365
  ecommpay
  elavon
  emerchantpay
  epay
  eprocessing_network
  epx
  eway
  exact
  first_atlantic_commerce
  first_data
  fiserv
  g2a_pay
  global_payments
  gocardless
  google_pay
  heartland
  hipay
  ingenico
  interac
  internetsecure
  intuit_quickbooks_payments
  iugu
  klarna
  komoju
  lemon_way
  mastercard_payment_gateway
  mercadopago
  mercanet
  merchant_esolutions
  mirjeh
  mollie
  moneris_solutions
  neopay
  neosurf
  nmi
  oceanpayment
  oney
  onpay
  openbucks
  openpaymx
  optimal_payments
  orangepay
  other
  pacnet_services
  payeezy
  payfast
  paygate
  paylike
  payment_express
  paymentwall
  payone
  paypal
  payplus
  paysafecard
  paysera
  paystation
  paytm
  paytrace
  paytrail
  payture
  payu
  payulatam
  payvision
  payway
  payza
  pinpayments
  placetopay
  posconnect
  princeton_payment_solutions
  psigate
  pxp_financial
  qiwi
  quickpay
  raberil
  razorpay
  rede
  redpagos
  rewardspay
  safecharge
  sagepay
  securetrading
  shopify_payments
  simplify_commerce
  skrill
  smartcoin
  smartdebit
  solidtrust_pay
  sps_decidir
  stripe
  synapsefi
  systempay
  telerecargas
  towah
  transact_pro
  trustly
  trustpay
  tsys
  usa_epay
  vantiv
  verepay
  vericheck
  vindicia
  virtual_card_services
  vme
  vpos
  windcave
  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)


182
183
184
# File 'lib/minfraud/components/payment.rb', line 182

def was_authorized
  @was_authorized
end