Apple Pay

I'm implementing Apple Pay in a Flutter iOS app using the pay plugin and Braintree as the payment processor. I have followed all necessary steps as outlined by Apple and community resources (e.g., Medium articles, official Apple Developer documentation), but the Apple Pay button does not appear on a real device. Here's what I've completed:

Created an Apple Pay Merchant ID

Created and downloaded the Apple Pay Payment Processing Certificate, then uploaded it to Braintree

Downloaded the Braintree-signed certificate and confirmed it's active in the Apple Developer portal

Added the Merchant ID under Signing & Capabilities in Xcode

Enabled Apple Pay capability in Xcode

Added the Merchant ID to Info.plist

Installed required Flutter packages (e.g., pay)

Using a valid Apple Pay payment configuration file in Flutter (see below)

Tested on a real iOS device with a valid Apple Pay test card added to Wallet

Flutter Payment Configuration (in Dart JSON):

json Copy Edit { "provider": "apple_pay", "data": { "merchantIdentifier": "merchant.com.example", "displayName": "My Store", "merchantCapabilities": ["3DS", "debit", "credit"], "supportedNetworks": ["visa", "masterCard", "amex"], "countryCode": "US", "currencyCode": "USD" } } Despite this complete setup, the ApplePayButton widget remains invisible There are no errors in the console. Can you help identify what may be missing or misconfigured at the code or configuration level?

I have write code for this

late Future<PaymentConfiguration> _applePayConfig;

_applePayConfig = PaymentConfiguration.fromAsset('apple_payment.json');

if (platform == TargetPlatform.iOS) FutureBuilder<PaymentConfiguration>( future: _applePayConfig, // Ensure this future is correctly initialized builder: (context, snapshot) {

                  print('Apple Pay snapshot: ${snapshot.connectionState}');
                  print('Apple Pay snapshot error: ${snapshot.error}');
                  print('Apple Pay snapshot data: ${snapshot.data}');

                  if (snapshot.connectionState == ConnectionState.done) {

                    if (snapshot.hasData) {
                      return Container(
                        margin: const EdgeInsets.symmetric(horizontal: 5), // 20 left and right
                        width: double.infinity, // Make it take full width (minus margin)
                        child: ApplePayButton(
                          paymentConfiguration: snapshot.data!,
                          paymentItems: const [
                            PaymentItem(
                              label: 'Total',
                              amount: '10.00',
                              status: PaymentItemStatus.final_price,
                            ),
                          ],
                          type: ApplePayButtonType.buy,
                          onPaymentResult: (result) {
                            print('Apple Pay RESULT: $result');
                            _showMessage('Apple Pay result received. Check console.');
                          },
                          loadingIndicator: const Center(
                            child: CircularProgressIndicator(),
                          ),
                          onError: (error) {
                            print('Apple Pay Error: $error');
                            _showMessage('Apple Pay Error');
                          },
                        ),
                      );
                    } else {
                      return const Text('Apple Pay Configuration Failed');
                    }
                  }
                  return const CircularProgressIndicator();
                },
              ),
I have write code for this still not Apear Apple Pay Button

[quote='838060022, Geeta_sharma, /thread/783285?answerId=838060022#838060022, /profile/Geeta_sharma']

I have write code for this still not Apear Apple Pay Button

child

[/quote]

I have write code for this

Apple Pay
 
 
Q