(at least) two changes are needed in the approvePaymentAndReturnStatus function to make the Resolve action handle the PayPal flow, both in the $approveResult->isSuccessful() block.
- get donor details from $statusResult->getDonorDetails and when present, add them to the $donationsMessage array.
- if the pending row says this was a recurring donation, and the $provider object supports creating recurring profiles (see T323962), call $provider->createRecurringPaymentsProfile()