Skip to content

Updating NCR Common Client

Windows

This process should be done on a Windows device, preferrably a fixed register with an MX925 that is already setup with NCR.

  1. Extract nupkg file from the NCR download

  2. Delete the contents of commerce/commerce-pay-ncr/src/main/resources/ncr/common/x64/

  3. Copy contents of artifacts/Windows/vs/x64/bin into the commerce-pay-ncr project commerce/commerce-pay-ncr/src/main/resources/ncr/common/x64/

  4. Delete the contents of commerce/commerce-pay-ncr/src/main/resources/ncr/common/Config/

  5. Copy contents of artifacts/Windows/Config into the commerce-pay-ncr project commerce/commerce-pay-ncr/src/main/resources/ncr/common/Config/

    • Do not copy the DeviceConnectionService.xml, as it is specific to the pinpad type (i.e. MX925 vs E355)
  6. Copy the file artifacts/Windows/Config/DeviceConnectionService.xml into the commerce-pay-ncr project commerce/commerce-pay-ncr/src/main/resources/ncr/mx925/Config/

  7. Ensure the configuration files copied to commerce-pay-ncr have the following values set. These files often have incorrect default values when NCR delivers the build.

    • CardProcessor.xml

      <Option Name="TerminalCapabilities" Value="ManualEntry,EMVContactless,EMVContact,RFID,MSR,Signature,PIN"/>
      
    • GlobalSettings.xml

      <Option Name="SupportedCardTypes" Value="Credit,Debit,GiftCard"/>
      
    • DeviceConnectionService.xml

      <Context Name="VerifoneMX925WindowsSerial">
          ...
          <Option Name="PortName" Value="COM9"/>
      
    • ConfigProcessor.xml

      <Option Name="HostTimeoutSeconds" Value="300"/>
      
  8. Update the version number in the WindowsNCRTest.testGetSourceVersion()

  9. Restart commerce and validate that the new version of NCR Common Client was used and is able to succesfully initialize.

Android

  1. Extract nupkg file from the NCR download

  2. Copy the extracted file artifacts/Android/clang/CommonClient.aar into the commerce/commerce-pay-ncr directory

  3. Modify the commerce/commerce-pay-ncr/ncr.publish.gradle file to set the new version number for the artifact, e.g.

    pom.version = "21.9.2328"
    
  4. Upload the CommonClient.aar artifact to jumpmind.maven.com

    • Must have the following properties set in ~/.gradle/gradle.properties
    deployUploadUrl=scp://maven.jumpmind.com:2222/home/jumpmind/www/repo
    # Update User/Password using Jumpmind Maven credentials
    deployUser=
    deployPassword=
    
    • Publish with the following command
    gradle -b ncr.publish.gradle uploadAllJars
    
    • If you have issues connecting to the maven repo even with the correct login parameters, the entry for [maven.jumpmind.com]:2222 in your ~/.ssh/known_hosts file may be of the wrong format (or may not exist). To fix this, you can run the following command to generate an rsa fingerprint:
      ssh -o HostKeyAlgorithms=ssh-rsa-cert-v01@openssh.com,ssh-rsa ssh://maven.jumpmind.com:2222
      
  5. Update the ncr-cordova-plugin with the new dependency in the nu-cordova project

    • nu-cordova/nu-cordova-plugins/ncr-cordova-plugin/src/android/dependencies.gradle
    implementation('com.ncr:common-client:21.9.2328')
    
  6. Update the ncr-cordova-plugin version

    • nu-cordova/nu-cordova-plugins/ncr-cordova-plugin/package.json
    "version": "0.1.8",
    
  7. Publish the ncr-cordova-plugin to npm

    • Must have access to the jumpmind npm repository https://www.npmjs.com/package/@jumpmind/ncr-cordova-plugin

    • Once you have access, you will also need to run the npm adduser command to associate your npm account with your local npm install.

    • nu-cordova/nu-cordova-plugins/ncr-cordova-plugin/

    npm publish
    
  8. Update the client cordova project with the new ncr-cordova-plugin

    • config.xml
    <plugin name="ncr-cordova-plugin" spec="@jumpmind/ncr-cordova-plugin@0.1.8"/>
    
    • package.json
    "@jumpmind/ncr-cordova-plugin": "0.1.8"
    
  9. Build the cordova project from the client assemble directory and validate the new build

    ./gradlew cordovaBuild
    
    9. [Optional] If you have problems with your client project not picking up the updated ncr-cordova-plugin, try deleting the ncr-cordova-plugin dir from the cordova project's plugins dir and running the cordovaBuild again.

  10. Commit the changes to both the client cordova project and the nu-cordova/nu-cordova-plugins/ncr-cordova-plugin project