Class: ActiveMerchant::Billing::Integrations::Doku::Helper
- Defined in:
- lib/active_merchant/billing/integrations/doku/helper.rb
Overview
service.shipping_address :city => ‘Jakarta’,
:address => 'Jl. Jendral Sudirman kav 59, Plaza Asia Office Park Unit 3',
:state => 'DKI Jakarta',
:zip => '12190',
:country => 'ID'
service.url 'http://yourstore.com'
end
Instance Attribute Summary
Attributes inherited from Helper
Instance Method Summary collapse
- #customer(params = {}) ⇒ Object
- #form_fields ⇒ Object
-
#initialize(order, account, options = {}) ⇒ Helper
constructor
A new instance of Helper.
Methods inherited from Helper
#add_field, #add_fields, #add_raw_html_field, #billing_address, #form_method, mapping, #raw_html_fields, #shipping_address, #test?
Constructor Details
#initialize(order, account, options = {}) ⇒ Helper
Returns a new instance of Helper.
35 36 37 38 39 |
# File 'lib/active_merchant/billing/integrations/doku/helper.rb', line 35 def initialize(order, account, = {}) @shared_key = .delete(:credential2) @transidmerchant = order super end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ActiveMerchant::Billing::Integrations::Helper
Instance Method Details
#customer(params = {}) ⇒ Object
48 49 50 51 52 53 54 55 |
# File 'lib/active_merchant/billing/integrations/doku/helper.rb', line 48 def customer(params = {}) add_field mappings[:customer][:name], "#{params[:first_name]} #{params[:last_name]}" add_field mappings[:customer][:email], params[:email] add_field mappings[:customer][:phone], params[:phone] add_field mappings[:customer][:mobile_phone], params[:mobile_phone] add_field mappings[:customer][:working_phone], params[:working_phone] add_field mappings[:customer][:birth_date], params[:birth_date] end |
#form_fields ⇒ Object
41 42 43 44 45 46 |
# File 'lib/active_merchant/billing/integrations/doku/helper.rb', line 41 def form_fields add_field 'WORDS', words add_field 'BASKET', basket add_field 'TRANSIDMERCHANT', @transidmerchant @fields end |