app/controllers/supercharged/gateway_notifications_controller.rb in supercharged-2.0.3 vs app/controllers/supercharged/gateway_notifications_controller.rb in supercharged-2.0.4

- old
+ new

@@ -12,11 +12,11 @@ error = if !@notification.complete? "not_completed" elsif !@notification.acknowledge "acknowledge_failed" elsif !@notification.charge - "charge not found" + "charge_not_found" end if error persistent_logger.error("Error: #{error.inspect}") @@ -25,10 +25,10 @@ if charge && !charge.error? @notification.charge.failed! @notification.charge.update_attribute(:error, error) end - head :bad_request + redirect_to new_charge_url, alert: "#{I18n.t("supercharged.gateway_controller.error.failed")}: #{I18n.t("supercharged.gateway_controller.error.#{error}")}" else persistent_logger.info("Success") @notification.approve if @notification.need_response? persistent_logger.info("Need need_response: #{@notification.success_response.inspect}")