Class: GlobalCollect::RequestModels::DoPayment::RecurringCreditCardOnlinePayment

Inherits:
RecurringPayment show all
Defined in:
lib/global_collect/request_models/do_payment/recurring_credit_card_online_payment.rb

Instance Attribute Summary

Attributes inherited from Base

#errors

Instance Method Summary collapse

Methods inherited from Base

#[], #[]=, #validate

Constructor Details

#initialize(attributes) ⇒ RecurringCreditCardOnlinePayment

Returns a new instance of RecurringCreditCardOnlinePayment.



3
4
5
6
# File 'lib/global_collect/request_models/do_payment/recurring_credit_card_online_payment.rb', line 3

def initialize(attributes)
  super(attributes)
  @attributes["CVVINDICATOR"] = "8"
end

Instance Method Details

#fieldsObject



10
11
12
13
14
15
16
17
18
# File 'lib/global_collect/request_models/do_payment/recurring_credit_card_online_payment.rb', line 10

def fields
  #
  # Per # WDL ยง5.13 "Create Additional Payments" section, the CVVINDICATOR
  # must be 8 for recurring payments.
  #
  super.merge({
    "CVVINDICATOR" => ["N1", "R"]
  })
end

#suggested_response_mixinsObject



7
8
9
# File 'lib/global_collect/request_models/do_payment/recurring_credit_card_online_payment.rb', line 7

def suggested_response_mixins
  super + [GlobalCollect::Responses::DoPayment::CreditCardResponseMethods]
end