x

Flutter Apple pay error production_simulator

I was working to integrate Apply pay. It loads just fine but when I try to process the payment it fails.

 

I generated a CSR using the sandbox Apple Pay and loaded it correctly to the Apple developer program Merchant ID. I confirmed I'm using my sandbox application ID. All other transactions go through for me (credit cards and Google pay) to the sandbox. Just not working for apply pay.

 

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.,

 

1,272 Views
Message 1 of 3
Report
2 REPLIES 2
Square Community Moderator

Hey @adia,

 

I reached out to our API team on this one and they said as far as they know- you do not need to load a sandbox apple pay CSR - it should just be a regular production CSR on Apple Pay’s developer portal, and as long as you use Square's sandbox application ID, it won’t be charged. 

Ashley C
Community Moderator, Square
Sign in and click Mark as Best Answer if my reply answers your question.
1,232 Views
Message 2 of 3
Report

I created a CSR from square for both sandbox and production both give me the same error in my initial question. I'm using the flutter Square In-app SDK. Maybe I need to post the issue on their public GitHub project?

https://github.com/square/in-app-payments-flutter-plugin/blob/master/doc/enable-applepay.md

 

These are the steps for Apply pay. Using google pay and Credit cards work fine.  

await InAppPayments.setSquareApplicationId(SANDBOX_APPLICATION_ID);

await InAppPayments.initializeApplePay(MERCHANT_ID);

await InAppPayments.requestApplePayNonce(
price: '1.00',
summaryLabel: 'Cookie',
countryCode: 'US',
currencyCode: 'USD',
paymentType: ApplePayPaymentType.finalPayment,
onApplePayNonceRequestSuccess: _onApplePayNonceRequestSuccess,
onApplePayNonceRequestFailure: _onApplePayNonceRequestFailure,
onApplePayComplete: _onApplePayEntryComplete);



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.

 

1,228 Views
Message 3 of 3
Report