Apple Pay 按钮未显示在真实设备中但同时显示

问题描述 投票:0回答:1

我在 flutter 应用程序中使用 pay 插件我使用默认的 configjsonfile 用于 apple pay。 而且我还设置了以下

  1. 在苹果控制台中添加 SandBox 测试器
  2. 通过设备中的沙盒测试器登录
  3. 在钱包应用程序中添加信用卡

仍然没有显示苹果支付按钮。

这是苹果按钮代码

final paymentItems = [
      const PaymentItem(
        label: 'Total',
        amount: '99.99',
        status: PaymentItemStatus.final_price,
      )
    ];



 ApplePayButton(
                      paymentConfiguration:
                          PaymentConfiguration.fromJsonString('''{
  "provider": "apple_pay",
  "data": {
    "merchantIdentifier": "merchant.com.kezo.app",
    "displayName": "Sam's Fish",
    "merchantCapabilities": ["3DS", "debit", "credit"],
    "supportedNetworks": ["amex", "visa", "discover", "masterCard"],
    "countryCode": "US",
    "currencyCode": "USD",
    "requiredBillingContactFields": ["emailAddress", "name", "phoneNumber", "postalAddress"],
    "requiredShippingContactFields": [],
    "shippingMethods": [
    {
      "amount": "0.00",
      "detail": "Available within an hour",
      "identifier": "in_store_pickup",
      "label": "In-Store Pickup"
    },
    {
      "amount": "4.99",
      "detail": "5-8 Business Days",
      "identifier": "flat_rate_shipping_id_2",
      "label": "UPS Ground"
    },
    {
      "amount": "29.99",
      "detail": "1-3 Business Days",
      "identifier": "flat_rate_shipping_id_1",
      "label": "FedEx Priority Mail"
    }
    ]
  }
}'''),
                      paymentItems: paymentItems,
                      style: ApplePayButtonStyle.black,
                      type: ApplePayButtonType.buy,
                      margin: const EdgeInsets.only(top: 15.0),
                      onPaymentResult: onApplePaymentResult,
                      loadingIndicator: const Center(
                        child: CircularProgressIndicator(),
                      ),
                    ),
ios flutter stripe-payments applepay google-pay
1个回答
0
投票

您是否按照这些步骤注册了 Apple Merchant ID、创建了 Apple Pay 证书并与 Xcode 集成?

© www.soinside.com 2019 - 2024. All rights reserved.