google-pay / flutter-plugin

Apache License 2.0
145 stars 130 forks source link

The applePay button is not displayed if no card is added #272

Open isyshuai opened 3 months ago

isyshuai commented 3 months ago

If the card is not added, userCanPay returns false, resulting in the button not being displayed. Shouldn't the pop-up window guide the user to add the card under normal circumstances?

isyshuai commented 3 months ago

I have to add the card in the wallet before I can do it. If I delete the card in the wallet, I will not be allowed to support it. Why not pop-up prompt to add the card?

mths0x5f commented 2 months ago

Apple Pay payment sheet will only be callable if the user already have a card registered because canMakePayments(usingNetworks:) would return false. That's documented behavior.

You're supposed to roll out your own messaging encouraging users to open Apple Pay and register a card: https://developer.apple.com/apple-pay/marketing/ and https://developer.apple.com/documentation/passkit_apple_pay_and_wallet/pkpaymentbuttontype/setup

isyshuai commented 1 month ago

I have Fork, and canMakePayments(usingNetworks:) changed to canMakePayments(), there is no card page display click to add the card, so far seems to be no problem