lib/active_merchant/billing/integrations/chronopay/notification.rb in activemerchant-1.4.2 vs lib/active_merchant/billing/integrations/chronopay/notification.rb in activemerchant-1.5.0

- old
+ new

@@ -57,10 +57,12 @@ def language params['language'] end def received_at - Time.parse("#{date} #{time}") unless date.blank? || time.blank? + # Date should be formatted "dd-mm-yy" to be parsed by 1.8 and 1.9 the same way + formatted_date = Date.strptime(date, "%m/%d/%Y").strftime("%d-%m-%Y") + Time.parse("#{formatted_date} #{time}") unless date.blank? || time.blank? end # Date of transaction in MM/DD/YYYY format def date params['date']