The Vedanta Sutras of Badarayana, Commentary by Sankara (SBE38), tr. by George Thibaut  at sacred-texts.com
40. Gaimini (thinks) for the same reasons that religious merit (is what brings about the fruits of actions).
Gaimini bases a contrary opinion on the reasons specified in the last two Sûtras. Scripture, he argues, proclaims injunctions such as the following one, 'He who is desirous of the heavenly world is to sacrifice.' Now as it is admitted that such scriptural injunctions must have an object, we conclude that the sacrifice itself brings about the result, i.e. the obtainment of the heavenly world; for if this were not so, nobody would perform sacrifices and thereby scriptural injunctions would be rendered purposeless.--But has not this view of the matter already been abandoned, on the ground that an action which passes away as soon as done can have no fruit?--We must, the reply is, follow the authority of scripture and assume such a connexion of action and fruit as agrees with scriptural statement. Now it is clear that a deed cannot effect a result at some future time, unless, before passing away, it gives birth to some unseen result; we therefore assume that there exists some result which we call apûrva, and which may be viewed either as an imperceptible after-state of the deed or as an imperceptible antecedent state of the result. This hypothesis removes all difficulties, while on the other hand it is impossible that the Lord should effect the results of actions. For in the first place, one uniform cause cannot be made to account for a great variety of effects; in the second place, the Lord would have to be taxed with partiality and cruelty; and in the third place, if the deed itself did not bring about its own fruit, it would be useless to perform it at all.--For all these reasons the result springs from the deed only, whether meritorious or non-meritorious.
41. Bâdârayana, however, thinks the former (i.e. the Lord, to be the cause of the fruits of action), since he is designated as the cause (of the actions themselves).
The teacher Bâdârayana thinks that the previously-mentioned Lord is the cause of the fruits of action. The word 'however' sets aside the view of the fruit being produced either by the mere deed or the mere apûrva.--The final conclusion then is that the fruits come from the Lord acting with a view to the deeds done by the souls, or, if it be so preferred, with a view to the apûrva springing from the deeds. This view is proved by the circumstance of scripture representing the Lord not only as the giver of fruits but also as the causal agent with reference to all actions whether good or evil. Compare the passage, Kau. Up. III, 8, 'He makes him whom he wishes to lead up from these worlds do a good deed; and the same makes him whom he wishes to lead down from these worlds do a bad deed.' The same is said in the Bhagavadgîtâ (VII, 21), 'Whichever divine form a devotee wishes to worship with faith, to that form I render his faith steady. Holding that faith he strives to propitiate the deity and obtains from it the benefits he desires, as ordained by me.'
All Vedânta-texts moreover declare that the Lord is the only cause of all creation. And his creating all creatures in forms and conditions corresponding to--and retributive of--their former deeds, is just what entitles us to call the Lord the cause of all fruits of actions. And as the Lord has regard to the merit and demerit of the souls, the objections raised above--as to one uniform cause being inadequate to the production of various effects, &c.--are without any foundation.