Yes, you have to repay an overpayment to which you were not entitled--as you evidently know you were not entitled, since you wrote that you were "only supposed to get 1 week's pay." A mistake by your former employer does not entitle you to the money; people and businesses can recover (or get back) accidental overpayments, and if you don't voluntarily repay it, they could sue you for the money.