Verify if Apple Pay is supported

DanielGlosDanielGlos USMember ✭✭

Hi everyone,

I'm trying to verify if Apple Pay is supported on the device. Currently I'm using

PKPaymentAuthorizationViewController.CanMakePayments && PKPaymentAuthorizationViewController.CanMakePaymentsUsingNetworks(this._supportedNetworks)

from PassKit. The problem is it evaluates my iOS simulator like it supports Apple Pay but in reallity it doesn't. Anyone knows what exactly theese two methods check. I'm implementing Apple Pay through Square payment form and it doesn't work when the Wallet app on iPhone is in sandbox mode. It works only with real valid cards. How could I verify that the device really supports Apple Pay and has a valid card added before I present him with payment form?

Answers

  • ColeXColeX Member, Xamarin Team Xamurai
    edited October 2018

    How could I verify that the device really supports Apple Pay and has a valid card added before I present him with payment form?

    CanMakePayments -> detect if device supports apple pay
    CanMakePaymentsUsingNetworks -> detect if it has a valid card added.

    This is the correct way and do not test on simulator.

Sign In or Register to comment.