Class: Buckaruby::SetupTransactionRequest
- Inherits:
-
TransactionRequest
- Object
- Request
- TransactionRequest
- Buckaruby::SetupTransactionRequest
- Defined in:
- lib/buckaruby/request.rb
Overview
Request for a creating a new transaction.
Instance Method Summary collapse
Methods inherited from TransactionRequest
#build_request_params, #operation
Methods inherited from Request
#build_request_params, #execute, #initialize, #operation
Constructor Details
This class inherits a constructor from Buckaruby::Request
Instance Method Details
#build_transaction_request_params(options) ⇒ Object
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 |
# File 'lib/buckaruby/request.rb', line 111 def build_transaction_request_params() params = {} case [:payment_method] when PaymentMethod::IDEAL params[:brq_service_ideal_action] = Action::PAY params[:brq_service_ideal_issuer] = [:issuer] if [:issuer] params[:brq_service_ideal_version] = '2' when PaymentMethod::IDEAL_PROCESSING params[:brq_service_idealprocessing_action] = Action::PAY params[:brq_service_idealprocessing_issuer] = [:issuer] if [:issuer] params[:brq_service_idealprocessing_version] = '2' when PaymentMethod::SEPA_DIRECT_DEBIT params.merge!( brq_service_sepadirectdebit_action: Action::PAY, brq_service_sepadirectdebit_customeriban: [:consumer_iban], brq_service_sepadirectdebit_customeraccountname: [:consumer_name] ) if [:consumer_bic] params[:brq_service_sepadirectdebit_customerbic] = [:consumer_bic] end if [:collect_date] params[:brq_service_sepadirectdebit_collectdate] = [:collect_date].strftime('%Y-%m-%d') end if [:mandate_reference] params.merge!( brq_service_sepadirectdebit_action: [Action::PAY, Action::EXTRA_INFO].join(','), brq_service_sepadirectdebit_mandatereference: [:mandate_reference], brq_service_sepadirectdebit_mandatedate: Date.today.strftime('%Y-%m-%d') ) end end params[:brq_startrecurrent] = [:recurring] if [:recurring] params end |