In-App Payments SDK - Mastercard Certificates update

We have received emails from Square asking us to update In-App Payments SDK version 1.6.3 (iOS) and 1.6.6 (Android) for some changes for Mastercard certificates. We are using React Native and it seems like this module is not ready to update yet? Can you let us know when this will be ready?

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

In-App Payments SDK Quickstart
Reader SDK Overview
Web Payments SDK Requirements

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

You can update the module to the latest version of the SDK. You’ll just need to configure it to target the latest version of the SDK. :slightly_smiling_face:

Hi are there any instructions on how to do that? as our developer wants to be 100% sure it is done correctly.

Thanks

For React Native, you’ll need to ensure that the underlying native iOS and Android SDKs are updated to the latest versions to accommodate the changes for Mastercard certificates. Here are the steps you can follow to update the SDK for both platforms:

For iOS:

  1. Update the SquareInAppPaymentsSDK in your Podfile to the latest version (1.6.3).
  2. Run pod install to install the updated SDK.

For Android:

  1. Update the com.squareup.sdk.in-app-payments dependency in your build.gradle file to the latest version (1.6.6).
  2. Sync your project with the updated build.gradle file.
    :slightly_smiling_face:

Hi Bryan,

Could you please give a bit more detail about how to achieve this please?

IOS

In my IOS podfile, the only line referencing Square is:

pod ‘RNSquareInAppPayments’, :path => ‘…/node_modules/react-native-square-in-app-payments’

How do I update this to the latest version? (1.6.3)

ANDROID

I looked in the build.gradle file and there is no ‘com.squareup.sdk.in-app-payments’ at all. How do I update the dependency?

To be honest, I’m a bit nervous hacking into the code like this. Is there not going to be an update to the React Native module to reference the correct SDK’s?

Thanks,

Paul

Hi Bryan,

Can I have an answer to my query please? The instructions you provided do not work.

Thanks,

Paul

Hi Bryan.

Can you please respond to my query on this as the instructions you offered are not sufficient and it’s been 14 days and no response.

How do I update the IOS podfile to the latest version? There is nothing in the podfile at all that references the version to use:

pod ‘RNSquareInAppPayments’, :path => ‘…/node_modules/react-native-square-in-app-payments’

Also, on Android, there is no com.squareup.sdk.in-app-payments at all in the build.gradle file that you asked me to update.

Can you please offer some support on this as we cannot update our app. Will there be an updated ReactNative module that does all this correctly and allows us to update?

Thanks,

Paul

Hi @Bryan-Square , do the startCardEntryFlow and completeCardEntry methods for card form to add card still process to add mastercard/visa if we do not update to the latest SDKs?

It will work with Visa but there was an update to the MasterCard certificates that requires you to update the SDK to continue to process MasterCard payments. :slightly_smiling_face:

There seems to be a new update to the react native plugin 1.7.6 . Will installing the new version solve the requirement ? How to make sure the correct SDK (1.6.3) is connected ?

After pod install, looks fine, I guess ?

Glad to hear that you got it updated. :slightly_smiling_face:

Here’s a simplified guide to updating the Square In-App Payments SDK:

iOS

  1. Open the Podfile:
  • Find and open the Podfile in your ios directory.
  1. Update the Podfile:
  • Change the line for RNSquareInAppPayments to:

ruby

Copy code

pod 'RNSquareInAppPayments', '1.6.3', :path => '../node_modules/react-native-square-in-app-payments'
  1. Install the Update:
  • Open Terminal, go to the ios directory, and run:

sh

Copy code

cd ios
pod install

Android

  1. Open build.gradle:
  • Find and open android/app/build.gradle.
  1. Add the Dependency:
  • Add this line in the dependencies section:

groovy

Copy code

[implementation](https://www.socialhubin.com) 'com.squareup.sdk.in-app-payments:in-app-payments:1.6.3'
  1. Sync the Project:
  • Sync the project in Android Studio or run:

sh

Copy code

cd android
./gradlew build

By following these steps, you should update the Square SDK to version 1.6.3 in both iOS and Android projects.