Class: Vpago::PaywayV2::Checkout
- Defined in:
- lib/vpago/payway_v2/checkout.rb
Instance Method Summary collapse
- #checkout_url ⇒ Object (also: #action_url)
- #gateway_params ⇒ Object
Methods inherited from Base
#amount, #api_key, #continue_success_url, #email, #first_name, #hash_data, #hash_hmac, #host, #initialize, #last_name, #merchant_id, #order_jwt_token, #payment_option, #payout, #phone, #public_key, #req_time, #return_deeplink, #return_deeplink_url, #return_params, #return_url, #transaction_fee, #transaction_fee_fix, #transaction_fee_percentage, #transaction_id, #type, #view_type
Constructor Details
This class inherits a constructor from Vpago::PaywayV2::Base
Instance Method Details
#checkout_url ⇒ Object Also known as: action_url
28 29 30 |
# File 'lib/vpago/payway_v2/checkout.rb', line 28 def checkout_url "#{host}#{ENV.fetch('PAYWAY_CHECKOUT_PATH', nil)}" end |
#gateway_params ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/vpago/payway_v2/checkout.rb', line 4 def gateway_params result = { req_time: req_time, merchant_id: merchant_id, tran_id: transaction_id, amount: amount, type: type, firstname: first_name, lastname: last_name, payment_option: payment_option, return_url: return_url, continue_success_url: continue_success_url, return_params: return_params, hash: hash_hmac } result[:email] = email unless email.nil? result[:phone] = phone unless phone.nil? result[:return_deeplink] = return_deeplink unless return_deeplink.nil? result[:view_type] = view_type unless view_type.nil? result[:payout] = payout unless payout.nil? result end |