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

SDK incorrectly detecting production application ID on iOS #217

Closed
ggirotto opened this issue Apr 26, 2023 · 1 comment
Closed

SDK incorrectly detecting production application ID on iOS #217

ggirotto opened this issue Apr 26, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@ggirotto
Copy link

Describe the issue

Facing the same issue as described in square/in-app-payments-react-native-plugin#192, but with Flutter plugin.
Complete error log:

ErrorInfo {<…>
code=usageError,<…>
message=Something went wrong. Please contact the developer of this application and provide them with this error code: production_simulator,<…>
debugCode=apple_pay_nonce_request_production_simulator,<…>
debugMessage=Apple Pay cannot be used in the simulator with a production Square application ID. Please use a Square sandbox application ID or test Apple Pay on a physical device.,<…>

To Reproduce

  1. Initialize Square with a sandbox application ID
  2. Try to perform a purchase through iOS simulator

Expected behavior

Payment should go through sandbox

Environment (please complete the following information):

  • platform: iOS
  • OS and version: iOS 16.4
  • dev environment: macOS
  • In-App Payments Plugin version: 1.7.6

In addition: Run flutter doctor -v in your terminal and copy the results here.

[✓] Flutter (Channel stable, 3.7.12, on macOS 13.3.1 22E261 darwin-arm64, locale en-BR)
    • Flutter version 3.7.12 on channel stable at /Users/guilhermegirotto/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4d9e56e694 (9 days ago), 2023-04-17 21:47:46 -0400
    • Engine revision 1a65d409c7
    • Dart version 2.19.6
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/guilhermegirotto/Library/Android/sdk
    • Platform android-33, build-tools 33.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.12.0

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /Applications/Brave Browser.app/Contents/MacOS/Brave Browser

[✓] Android Studio (version 2022.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

[✓] VS Code (version 1.77.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.62.0

[✓] Connected device (3 available)
    • iPhone 14 Pro (mobile) • 1D35CAB4-B6DC-47FC-A7E2-A2F90A5A2AB4 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 13.3.1 22E261 darwin-arm64
    • Chrome (web)           • chrome                               • web-javascript • Brave Browser 112.1.50.121

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Screenshots

Additional context

Although the payment fails, it seems that Apple Pay prompt correct detects sandbox mode:

Screenshot

CleanShot 2023-04-26 at 18 10 07

@ggirotto ggirotto added the bug Something isn't working label Apr 26, 2023
@ggirotto ggirotto changed the title SDK incorrectly detecting production application ID in iOS SDK incorrectly detecting production application ID on iOS May 2, 2023
@Charmis-Square
Copy link
Contributor

Apple Pay on sandbox on simulator is currently unsupported, and we recommend testing with a physical device please check updated docs in https://github.com/square/in-app-payments-react-native-plugin/blob/master/docs/enable-applepay.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants