Paid twice by university for "same" research: how to proceed?
If the university decides one of the payments was made in error, they will almost certainly demand it back, and if you don't repay it promptly, they'll likely take steps that you won't enjoy (e.g. withholding from your paycheck, suing you, firing you, etc; specifics will depend on their policies and local law).  So don't spend the extra money until the situation is clarified.  Keep it in your bank account.  If they're paper checks, don't cash or deposit them.

Contact your advisors in both departments and explain the situation.  If somehow you're entitled to both payments, you'll get explicit confirmation and then you'll know you can keep all the money.  If not, they can negotiate between themselves as to where the money should go, and they'll tell you how much to repay, to whom, and how.