Whenever the drawer or endorser of an accepted bill of exchange or the endorser or guarantor of a promissory note shall have been joined with the acceptor of the bill or the maker of the note in an action to enforce the collection thereof, and judgment has been entered against such drawer, endorser or guarantor who thereafter pays the same, the person so paying shall be entitled to have the judgment released as to him, but the same shall, at his option, stand and may be enforced under the order of the court against any other party thereto who remains liable to the party paying as upon the bill or note, for the reimbursement of the party so paying. If there is any contest as to such liability the court may order an issue to be made up between the contesting parties, which shall be summarily determined as the court may direct.
815 ILCS 115/4