Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StripeUICore/ImageMaker.swift:51: Assertion failed: Failed to find an image named apple_pay_mark #1935

Open
TalentKingPython opened this issue Sep 23, 2024 · 0 comments
Labels
iOS Issue related to iOS native bindings Stripe sdk Issues related to the Stripe sdk

Comments

@TalentKingPython
Copy link

TalentKingPython commented Sep 23, 2024

===== Code Block =====

Future _stripePaymentProcess(dynamic paymentIntent, int paymentType, PlaceOrderPojo paymentDetail) async {
if (paymentType == 1) {
await Stripe.instance.initPaymentSheet(
paymentSheetParameters: SetupPaymentSheetParameters(
customFlow: true,
merchantDisplayName: 'Hare',
paymentIntentClientSecret: paymentIntent['paymentIntent'],
customerEphemeralKeySecret: paymentIntent['ephemeralKey'],
customerId: paymentIntent['customerId'],
applePay: PaymentSheetApplePay(merchantCountryCode: 'NO', cartItems: [
ApplePayCartSummaryItem.immediate(
label: paymentDetail.orderNo,
amount: '${paymentDetail.totalPay}',
isPending: false)
]),
googlePay: const PaymentSheetGooglePay(
merchantCountryCode: 'NO', testEnv: true),
style: ThemeMode.dark,
),
);

  await Stripe.instance.presentPaymentSheet();

  await Stripe.instance.confirmPaymentSheetPayment();
} else if (paymentType == 2) {
  if (Platform.isAndroid) {
    await Stripe.instance.confirmPlatformPayPaymentIntent(
      clientSecret: paymentIntent['paymentIntent'],
      confirmParams: const PlatformPayConfirmParams.googlePay(
        googlePay: GooglePayParams(
          merchantName: 'Hare',
          allowCreditCards: true,
          isEmailRequired: false,
          testEnv: true,
          currencyCode: 'nok',
          merchantCountryCode: 'no',
        ),
      ),
    );
  } else if (Platform.isIOS) {
    await Stripe.instance.confirmPlatformPayPaymentIntent(
      clientSecret: paymentIntent['paymentIntent'],
      confirmParams: PlatformPayConfirmParams.applePay(
        applePay: ApplePayParams(
          merchantCountryCode: 'no',
          currencyCode: 'nok',
          cartItems: [
            ApplePayCartSummaryItem.immediate(
                label: paymentDetail.orderNo,
                amount: '${paymentDetail.totalPay}',
                isPending: false)
          ],
        ),
      ),
    );
  }
}

}

===== Description =====
Here is 3 payment options: google pay, apple pay, card pay(payment intent sheet)

google pay & apple pay is working well
And card pay is working well in android device
But card pay in iPhone Device is not working. cause error "StripeUICore/ImageMaker.swift:51: Assertion failed: Failed to find an image named apple_pay_mark". And then lost connection to device.

I have run flutter clean, flutter pub get, pod delegrate, pod install.

Smartphone / tablet

  • Device: iPhone Se(3rd generation)
  • OS: iOS 17.5
  • Package version: 9.5.0+1
  • Flutter version 3.7.0
@TalentKingPython TalentKingPython added the needs triage Needs triage label Sep 23, 2024
@remonh87 remonh87 added Stripe sdk Issues related to the Stripe sdk iOS Issue related to iOS native bindings and removed needs triage Needs triage labels Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iOS Issue related to iOS native bindings Stripe sdk Issues related to the Stripe sdk
Projects
None yet
Development

No branches or pull requests

2 participants