class GenesisRuby::Api::Requests::Financial::OnlineBankingPayments::Sofort

Sofort, bank transfer payment method, popular in Germany

def init_field_validations # rubocop:disable Metrics/MethodLength

rubocop:disable Metrics/MethodLength
Sofort field validation
def init_field_validations # rubocop:disable Metrics/MethodLength
  super
  required_fields.push *%i[
    transaction_id
    remote_ip
    return_success_url
    return_failure_url
    amount
    currency
    customer_email
    billing_country
  ]
  field_values.merge! billing_country: %w(AT BE DE IT NL PL ES CH)
end

def payment_transaction_structure # rubocop:disable Metrics/MethodLength

rubocop:disable Metrics/MethodLength
Sofort request structure
def payment_transaction_structure # rubocop:disable Metrics/MethodLength
  {
    notification_url:   notification_url,
    return_success_url: return_success_url,
    return_failure_url: return_failure_url,
    return_pending_url: return_pending_url,
    customer_email:     customer_email,
    customer_phone:     customer_phone,
    iban:               iban,
    bic:                bic,
    billing_address:    billing_address_parameters_structure,
    shipping_address:   shipping_address_parameters_structure
  }
end

def transaction_type

Sofort transaction type
def transaction_type
  Api::Constants::Transactions::SOFORT
end