If you are working with payment gateways don't rely on session data to store information you will use to link the payment back to the user. Instead, since the user is paying for something there must be an orders/subscriptions table or even just the the user's id itself. So you can pass that identifying information to PayPal in the custom fields you're allowed to pass and then in the redirects/callbacks you can do something like (not Omnipay code, but it illustrates the point):
$response = GetExpressCheckoutDetails( $_REQUEST['token'] );
$orderID = $response["PAYMENTREQUEST_0_CUSTOM"];
This way you can complete the transaction whether or not the user has an active session; and if your database fails, you don't have to refund the customer because the problem is not on their end but yours. You're better off catching the database failure and have the script log or email a note telling you so and so paid successfully but the database failed - and you manually fulfil the purchase.