Closed miklselsoe closed 11 months ago
@miklselsoe I assume you are not using Dropin which should not show Apple pay as an option if user cannot make payments with it.
And for using stand alone ApplePayComponent
, the init of ApplePayComponent
throws an error the same way if it can't make payments. You can see the code here.
Hope this helps!
@erenbesel I see. I just need to switch some logic around in order to fix it. Thanks!
Describe the challenge I am trying to determine whether or not to present the ApplePay payment option to my users based on whether it is supported by their device and if the card(s) they have set up in Apple Pay is supported by my Adyen configuration.
When I get the
ApplePayPaymentMethod
, it has thebrands
property, which is an array of strings. In order to askPassKit
if ApplePay is set up for any of these brands, I need to translate the brands into a list ofPKPaymentNetwork
but the strings does not match the raw values of thePKPaymentNetwork
struct. I can't find any way to do a translation between the two.Does this translation exist? How do I determine whether or not ApplePay is configured for the list of cards enabled in my Adyen environment?
Documentation update (optional) I would like a complete reference to the values that can be read from the
brands
property ofApplePayPaymentMethod
. Even better, it would be nice to translate this array into an array ofPKPaymentNetwork
.