Class: Ogone::Flexcheckout

Inherits:
Base
  • Object
show all
Defined in:
lib/ogone/flexcheckout.rb

Constant Summary collapse

MANDATORY_PARAMETERS =
%w[
  ACCOUNT.PSPID
  PARAMETERS.ACCEPTURL
  PARAMETERS.EXCEPTIONURL
  CARD.PAYMENTMETHOD
  LANGUAGE
].freeze
OUTBOUND_SIGNATURE_PARAMETERS =
%i[
  ALIAS.ALIASID
  ALIAS.NCERROR
  ALIAS.NCERRORCARDNO
  ALIAS.NCERRORCN
  ALIAS.NCERRORCVC
  ALIAS.NCERRORED
  ALIAS.ORDERID
  ALIAS.STATUS
  ALIAS.STOREPERMANENTLY
  CARD.BIC
  CARD.BIN
  CARD.BRAND
  CARD.CARDHOLDERNAME
  CARD.CARDNUMBER
  CARD.CVC
  CARD.EXPIRYDATE
].freeze

Constants inherited from Base

Base::SIGNING_ALGORITHMS, Base::VALID_ENVIRONMENTS

Instance Attribute Summary

Attributes inherited from Base

#sha_in, #sha_out

Instance Method Summary collapse

Methods inherited from Base

#add_parameters, #add_single_return_url, #check_shasign_out!, #environment=, #initialize, #sha_algo=, #upcase_keys

Constructor Details

This class inherits a constructor from Ogone::Base

Instance Method Details

#fields_for_payment(parameters = {}) ⇒ Object



37
38
39
# File 'lib/ogone/flexcheckout.rb', line 37

def fields_for_payment(parameters = {})
  super(parameters, 'SHASIGNATURE.SHASIGN')
end

#form_urlObject



41
42
43
# File 'lib/ogone/flexcheckout.rb', line 41

def form_url
  "https://#{ogone_host}/Tokenization/HostedPage?#{URI.encode_www_form(fields_for_payment)}"
end

#pspid=(pspid) ⇒ Object



32
33
34
35
# File 'lib/ogone/flexcheckout.rb', line 32

def pspid=(pspid)
  super(pspid)
  @parameters[:'ACCOUNT.PSPID'] = pspid
end