Adyen / adyen-flutter

MIT License
23 stars 4 forks source link

Issue with AdyenCardComponent with stored payment method on IOS #247

Closed Shahin-Sefidgaran closed 3 days ago

Shahin-Sefidgaran commented 2 weeks ago

Hello Adyen I am feeding the following paymentMethod to adyenCardComponent to trigger the payment with stored payment method behavior

paymentMethod = {
        'brand': cardTypeToString[widget.selectedCreditCard!.cardType]!['brand'],
        'holderName': widget.selectedCreditCard!.holderName,
        'id': widget.selectedCreditCard!.cardId,
        'lastFour': widget.selectedCreditCard!.number,
        'name': cardTypeToString[widget.selectedCreditCard!.cardType]!['name'],
        'supportedRecurringProcessingModels': ["Ecommerce", "ContAuth"],
        'type': 'scheme',
      };

I am receiving the expected result on Android but not on IOS (blank screen) I think it should have a consistent behavior on both platforms how can I trigger the payment with existing card (storedPaymentMethod) on IOS as well?

Robert-SD commented 2 weeks ago

Hi @Shahin-Sefidgaran, Thanks for sharing your paymentMethod object. As assumed, stored cards are supported on iOS as well. While Android displays the card component, iOS renders a prompt for entering the CVC. The screenshot shows the example app with a stored card.

By comparing your paymentMethod object with the example, I identified that these three fields are missing: 'expiryMonth' : 'MM', 'expiryYear': 'YY', 'supportedShopperInteractions': ["Ecommerce", "ContAuth"]

The value for supportedRecurringProcessingModels should be as set of ["CardOnFile", "Subscription", "UnscheduledCardOnFile"]. You can find more information in our docs.

Do you have the data for these fields and could you try adding them to the paymentMethod object as well?

Simulator Screenshot - iPhone 15 Pro - 2024-08-27 at 17 35 13

Robert-SD commented 3 days ago

Hi @Shahin-Sefidgaran, I would like to follow up on your question? Have you been able to try out adding the fields?

Shahin-Sefidgaran commented 3 days ago

Hey @Robert-SD I appreciate the reply Yes I managed to summon the prompt on IOS by updating the missing fields 🙌