2538. Where the consideration for the payment of the premium totally fails and there has been no fraud or illegality on the part of the insured, the premium is returnable to the insured.
Where the consideration for the payment of the premium is apportionable and there is a total failure of any apportionable part of the consideration, a proportionable part of the premium is, under the same conditions, returnable to the insured.