Apple's rules on third-party payment gateways are complex, and there are some exceptions.
Apple requires developers to use Apple's in-app purchase system for all digital goods and services sold within their apps. This is how Apple generates revenue from the App Store, and it also allows Apple to provide fraud protection and other security features for users.
However, there are a few exceptions to this rule. First, Apple allows apps to use third-party payment gateways for physical goods and services. This is why apps like Home Depot and Hala Guys can let users enter their credit card information and process payments through third-party gateways.
Second, Apple allows apps to use third-party payment gateways for one-time purchases of digital goods and services that are delivered outside of the app. For example, an app that sells ebooks could allow users to purchase ebooks using a third-party payment gateway, but the ebook would then need to be downloaded or accessed outside of the app.
Finally, Apple allows apps to use third-party payment gateways for subscriptions and recurring payments that are managed outside of the app. For example, a magazine app could allow users to subscribe to the magazine using a third-party payment gateway, but the subscription would then be managed by the magazine publisher directly.
In the case of Home Depot, the app is allowed to redirect payment processing to PayPal because PayPal is a third-party payment gateway that is used for physical goods and services.