Contents

canMakePayments(usingNetworks:)

Returns whether the user can make payments through the specified network.

Declaration

nonisolated class func canMakePayments(usingNetworks supportedNetworks: [PKPaymentNetwork]) -> Bool

Parameters

  • supportedNetworks:

    An array of payment networks, as listed in Payment Networks.

Return Value

true if the user can make payments through any of the specified networks; otherwise, false.

Discussion

User may not be able to make payments for a variety of reasons. For example, this functionality may not be supported by their hardware, or it may be restricted by parental controls.

If there are no configured payment cards, this method always returns false.

See Also

Determining whether the user can make payments