You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our team is trying to integrate Apple Pay into our React Native app using the RN Plugin for In-App Payments SDK, but we keep running into this error: [Error: Something went wrong. Please contact the developer of this application and provide them with this error code: rn_apple_pay_not_supported] whenever we call SQIPApplePay.requestApplePayNonce.
To Reproduce
Steps to reproduce the issue.
Initialize the SDK
Initialize Apple Pay
call await SQIPApplePay.requestApplePayNonce
Here the piece of code that reproduce the issue.
useEffect(()=>{constinitializeDigitalWallet=async()=>{letdigitalWalletEnabled=false;if(Platform.OS==='ios'){try{awaitSQIPApplePay.initializeApplePay('merchant.FMApplePay');digitalWalletEnabled=awaitSQIPApplePay.canUseApplePay();}catch(error){console.error('Error initializing Apple Pay:',error);}}elseif(Platform.OS==='android'){// Add Android-specific logic here}setCanUseDigitalWallet(digitalWalletEnabled);};initializeDigitalWallet();},[]);constonApplePayNonceRequestSuccess=async(cardDetails)=>{try{// Process the card nonce details (e.g., take payment)// await chargeCard(cardDetails);// Close the Apple Pay sheet successfullyawaitSQIPApplePay.completeApplePayAuthorization(true);}catch(ex){// Handle card nonce processing failureawaitSQIPApplePay.completeApplePayAuthorization(false,ex.message);}};constonApplePayNonceRequestFailure=async(errorInfo)=>{// Handle the error and close the Apple Pay sheetconsole.log(errorInfo,'!!!!!!!!!!!!err')awaitSQIPApplePay.completeApplePayAuthorization(false,errorInfo.message);};constonApplePayEntryComplete=()=>{// Handle the event when the Apple Pay sheet is closedconsole.log('Apple Pay sheet closed');};constonStartDigitalWallet=async()=>{if(Platform.OS==='ios'){constapplePayConfig={price: '1.00',summaryLabel: 'Test Item',countryCode: 'US',currencyCode: 'USD',};try{awaitSQIPApplePay.requestApplePayNonce(applePayConfig,onApplePayNonceRequestSuccess,onApplePayNonceRequestFailure,onApplePayEntryComplete,);}catch(ex){console.error('Error requesting Apple Pay nonce:',ex);}}elseif(Platform.OS==='android'){// Add Android-specific logic here}};ExpectedbehaviorTheApplePayfinishandreturnmethevalidtoken.**Environment(pleasecompletethefollowinginformation):**-platform: iOS-In-AppPaymentsPlugin version: [e.g.1.7.6]
The text was updated successfully, but these errors were encountered:
Describe the issue
Our team is trying to integrate Apple Pay into our React Native app using the RN Plugin for In-App Payments SDK, but we keep running into this error: [Error: Something went wrong. Please contact the developer of this application and provide them with this error code: rn_apple_pay_not_supported] whenever we call SQIPApplePay.requestApplePayNonce.
To Reproduce
Steps to reproduce the issue.
await SQIPApplePay.requestApplePayNonce
Here the piece of code that reproduce the issue.
The text was updated successfully, but these errors were encountered: