I had bind a sandbox debit card 5204 2477 5000 1489 and capabilities pass [.capability3DS, .capabilityDebit]
but the canMakePayments returns false.
Then if the capabilities only pass .capability3DS canMakePayments returns true
anyone know why this happens? and how can I fix this question
static let supportedNetworks: [PKPaymentNetwork] = [
.masterCard,
.visa
]
class func canMakePayments(with capabilities: PKMerchantCapability) -> Bool {
return PKPaymentAuthorizationController.canMakePayments(usingNetworks: supportedNetworks, capabilities: capabilities)
}
static func capability(from string: String) -> PKMerchantCapability {
switch string {
case "credit":
return [.capability3DS, .capabilityCredit]
case "debit":
return [.capability3DS, .capabilityDebit]
default:
return .capability3DS
}
}