By virtue of such payment the surety is subrogated in all the rights which the creditor had against the debtor.
Should the surety have compromised with the creditor, he cannot demand of the debtor more than that which he has really paid.
History —Civil Code, 1930, § 1738.