We show that the controversies on the gauge dependence and the infrared singularity emerged in the generalized factorization approach for nonleptonic heavy meson decays within the framework of the operator product expansion can be resolved by perturbative QCD factorization theorem. Gauge invariance of the decay amplitude is maintained under radiative corrections by assuming on-shell external quarks. For on-shell external quarks, infrared poles in radiative corrections have to be extracted using the dimensional regularization. These poles, signifying nonperturbative dynamics of a decay process, are absorbed into bound-state wave functions. Various large logarithms produced in radiative corrections are summed to all orders into the Wilson and Sudakov evolution factors. The remaining finite part gives a hard subamplitude. A decay rate is then factorized into a convolution of the hard subamplitude, the Wilson coefficient, and the Sudakov factor with the bound-state wave functions, all of which are well-defined and gauge invariant.