app/controllers/backoffice/dashboard_controller.rb
# Will change the payment method to phone, as a fallback, as this is most likely
# an application having issues with online payments, or an user not fully completing
# the payment journey and letting the payment expire (time out).
# This is mainly an issue with non-saved applications as the user can't return to it.
# Mark as completed and trigger the submission emails.
#
Will change the payment method to phone, as a fallback, as this is most likely
an application having issues with online payments, or an user not fully completing
the payment journey and letting the payment expire (time out).
This is mainly an issue with non-saved applications as the user can't return to it.
Mark as completed and trigger the submission emails.
Will change the payment method to phone as a fallback as this is most likely an application having issues with online payments or an user not fully completing the payment journey and letting the payment expire ( time out ) . This is mainly an issue with non - saved applications as the user can ' t return to it . Mark as completed and trigger the submission emails .
def complete_application
      c100_application = C100Application.not_completed.find(params[:dashboard_id])
      c100_application.update_column(
        :payment_type, PaymentType::SELF_PAYMENT_CARD.value
      )
      c100_application.mark_as_completed!
      C100App::OnlineSubmissionQueue.new(c100_application).process
      audit!(
        action: :application_completed,
        details: { reference_code: c100_application.reference_code, payment_type: c100_application.payment_type }
      )
      redirect_to backoffice_dashboard_index_path, flash: {
        alert: "Application #{c100_application.reference_code} has been completed and emails will be sent shortly."
      }
    end
def complete_application c100_application = C100Application . not_completed . find ( params [ :dashboard_id ] ) c100_application . update_column ( :payment_type , PaymentType :: SELF_PAYMENT_CARD . value ) c100_application . mark_as_completed! C100App :: OnlineSubmissionQueue . new ( c100_application ) . process audit! ( action : :application_completed , details : { reference_code : c100_application . reference_code , payment_type : c100_application . payment_type } ) redirect_to backoffice_dashboard_index_path , flash : { alert : "Application #{c100_application.reference_code} has been completed and emails will be sent shortly." } end
Will change the payment method to phone, as a fallback, as this is most likely
an application having issues with online payments, or an user not fully completing
the payment journey and letting the payment expire (time out).
Will change the payment method to phone as a fallback as this is most likely an application having issues with online payments or an user not fully completing the payment journey and letting the payment expire ( time out ) .