Closed Thibault4 closed 8 months ago
Hello @Thibault4,
Thanks for providing the bug description. The expected behavior is correct and Apple Pay is not supported on Android devices.
In order to filter out non supported payment methods, it is necessary to provide the “channel” parameter in the POST /sessions request body in your backend implementation. The value needs to be set to either “iOS” or “Android” depending on the platform where the payment transaction takes place.
Could you add this parameter and test it again? Apple Pay should not appear anymore on the Android device.
Please let me know if you need further assistance.
Hi @Thibault4, just wanted to catch up and ask if you were able to solve the issue by including the channel parameter in your request?
Hello @Thibault4, we closed the issue. Feel free to reach out in case you need any further assistance.
Describe the bug I'm encountering an unexpected behavior in my Flutter application where the Apple Pay payment method is appearing on Android devices. Despite the fact that the plugin I'm using is in beta, I wouldn't expect Apple Pay to be available on Android devices. This inconsistency is causing confusion for users and is not the intended behavior.
To Reproduce Steps to reproduce the behavior:
Expected behavior ` import 'package:adyen_checkout/adyen_checkout.dart'; import 'package:flutter/material.dart'; import 'package:dio/dio.dart';
class MyPage extends StatelessWidget { final String apiUrl = 'http://192.168.1.35:3000/api'; // Votre URL d'API Adyen
Future<Map<String, dynamic>> getSessionData() async { try { // Effectuez une requête HTTP GET à votre endpoint /sessions pour obtenir les données de session Response response = await Dio().post('$apiUrl/sessions'); print('Return data ' + response.data.toString()); return response.data; } catch (error) { throw Exception('Failed to load session data ' + error.toString()); } }
void startDropIn(BuildContext context) async { try { // Obtenez les données de session Map<String, dynamic> sessionData = await getSessionData();
}
@override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text('Adyen Payment Demo'), ), body: Center( child: IconButton( onPressed: () { startDropIn(context); }, icon: const Icon(Icons.payment), ), ), ); } } `
Screenshots
Smartphone (please complete the following information):
Additional context On iOS I don't have google pay that is ok