Class: OffsitePayments::Integrations::Coinbase::Return
- Defined in:
- lib/offsite_payments/integrations/coinbase.rb
Instance Attribute Summary
Attributes inherited from Return
Instance Method Summary collapse
-
#initialize(query_string, options = {}) ⇒ Return
constructor
A new instance of Return.
- #parse(query_string) ⇒ Object
Methods inherited from Return
#cancelled?, #message, #success?
Constructor Details
#initialize(query_string, options = {}) ⇒ Return
Returns a new instance of Return.
131 132 133 134 |
# File 'lib/offsite_payments/integrations/coinbase.rb', line 131 def initialize(query_string, = {}) super @notification = Notification.new(@params.to_json, ) end |
Instance Method Details
#parse(query_string) ⇒ Object
136 137 138 139 140 141 142 143 144 |
# File 'lib/offsite_payments/integrations/coinbase.rb', line 136 def parse(query_string) parsed_hash = Rack::Utils.parse_nested_query(query_string) if native_cents = parsed_hash['order'] && parsed_hash['order']['total_native'] && parsed_hash['order']['total_native']['cents'] parsed_hash['order']['total_native']['cents'] = native_cents.to_i end parsed_hash end |