lib/payanyway/controller.rb in payanyway-1.2.0 vs lib/payanyway/controller.rb in payanyway-1.2.1

- old
+ new

@@ -39,12 +39,18 @@ in_progress_implementation(service.pretty_params[:order_id]) end def check service = Payanyway::Response::Check.new(params) - raise service.error_message unless service.success? + if service.pretty_params.present? + raise service.error_message unless service.success? - render xml: service.result(check_implementation(service.pretty_params)).to_xml + render xml: service.result(check_implementation(service.pretty_params)).to_xml + else + # Не выдавать ошибку, если параметры пустые + # Необходимо для проверки со стороны moneta.ru + render nothing: true + end end private def pay_implementation(params)