Verifying if user has Apple Pay or not

Is there pre-built swift code that verifies whether a user has apple pay or not and if not signs them up before continuing?

My understanding is that by using the

PKPaymentButton
in your code, when the payment sheet is displayed the user will be presented with a button to buy or sign up for Apple Pay. You may want to check device and card support, however.


From the docs:

https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/ApplePay.html

-=-

Always display Apple Pay UI to people who can use it. When users are on a supported device and they’ve activated a card that you support, it’s likely that they’ll want to use Apple Pay in your app. Meet users’s expectations by making Apple Pay the default payment option.


Don’t display any Apple Pay UI if a user can’t use Apple Pay. If the user is using a device that doesn’t support Apple Pay, advertising it as a payment option can be confusing. However, if the user is using a device that supports Apple Pay, but doesn’t have a credit or debit card set up, you can display the Set Up Apple Pay button.


Display the payment sheet immediately after a user taps the Apple Pay button. Forcing people to take additional steps after they’ve decided to begin their checkout with Apple Pay adds friction to the process and can frustrate your users. Don’t display additional alerts or modal views after a user taps the Apple Pay button. If users can supply things like discount or promotional codes, find a way to accept this information before they tap the Apple Pay button.

Verifying if user has Apple Pay or not
 
 
Q