Class: ActiveMerchant::Billing::Integrations::Platron::Helper
- Defined in:
- lib/active_merchant/billing/integrations/platron/helper.rb
Instance Attribute Summary
Attributes inherited from Helper
Instance Method Summary collapse
- #form_fields ⇒ Object
-
#initialize(order, account, options = {}) ⇒ Helper
constructor
A new instance of Helper.
- #params ⇒ Object
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.
6 7 8 9 10 11 12 13 |
# File 'lib/active_merchant/billing/integrations/platron/helper.rb', line 6 def initialize(order, account, = {}) @secret_key = .delete(:secret) @path = .delete(:path) description = .delete(:description) super self.add_field('pg_salt', rand(36**15).to_s(36)) self.add_field('pg_description', description) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ActiveMerchant::Billing::Integrations::Helper
Instance Method Details
#form_fields ⇒ Object
15 16 17 |
# File 'lib/active_merchant/billing/integrations/platron/helper.rb', line 15 def form_fields @fields.merge('pg_sig' => Common.generate_signature(@fields, @path, @secret_key)) end |
#params ⇒ Object
19 20 21 |
# File 'lib/active_merchant/billing/integrations/platron/helper.rb', line 19 def params @fields end |