Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for missing payment networks to Apple Pay #286

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 39 additions & 6 deletions pay_ios/ios/Classes/PaymentExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,23 @@ extension PKPaymentNetwork {
switch paymentNetworkString {
case "amex":
return .amex
case "bankAxept":
guard #available(iOS 17.5, *) else { return nil }
return .bankAxept
case "bancontact":
guard #available(iOS 16.0, *) else { return nil }
return .bancontact
case "barcode":
guard #available(iOS 14.0, *) else { return nil }
return .barcode
case "cartesBancaires":
guard #available(iOS 12.0, *) else { return nil }
return .cartesBancaires
case "chinaUnionPay":
return .chinaUnionPay
case "dankort":
guard #available(iOS 15.1, *) else { return nil }
return .dankort
case "discover":
return .discover
case "eftpos":
Expand All @@ -132,6 +144,9 @@ extension PKPaymentNetwork {
case "elo":
guard #available(iOS 12.1.1, *) else { return nil }
return .elo
case "girocard":
guard #available(iOS 14.0, *) else { return nil }
return .girocard
case "idCredit":
return .idCredit
case "interac":
Expand All @@ -146,23 +161,41 @@ extension PKPaymentNetwork {
return .maestro
case "masterCard":
return .masterCard
case "meeza":
guard #available(iOS 17.4, *) else { return nil }
return .meeza
case "mir":
guard #available(iOS 14.5, *) else { return nil }
return .mir
case "nanaco":
guard #available(iOS 15.0, *) else { return nil }
return .nanaco
case "NAPAS":
guard #available(iOS 17.5, *) else { return nil }
return .NAPAS
case "pagoBancomat":
guard #available(iOS 17.0, *) else { return nil }
return .pagoBancomat
case "postFinance":
guard #available(iOS 16.4, *) else { return nil }
return .postFinance
case "privateLabel":
return .privateLabel
case "quicPay":
return .quicPay
case "suica":
return .suica
case "tmoney":
guard #available(iOS 17.0, *) else { return nil }
return .tmoney
case "visa":
return .visa
case "vPay":
guard #available(iOS 12.0, *) else { return nil }
return .vPay
case "barcode":
guard #available(iOS 14.0, *) else { return nil }
return .barcode
case "girocard":
guard #available(iOS 14.0, *) else { return nil }
return .girocard
case "waon":
guard #available(iOS 15.0, *) else { return nil }
return .waon
default:
return nil
}
Expand Down