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.
-
Extract nupkg file from the NCR download
-
Delete the contents of
commerce/commerce-pay-ncr/src/main/resources/ncr/common/x64/ -
Copy contents of
artifacts/Windows/vs/x64/bininto the commerce-pay-ncr projectcommerce/commerce-pay-ncr/src/main/resources/ncr/common/x64/ -
Delete the contents of
commerce/commerce-pay-ncr/src/main/resources/ncr/common/Config/ -
Copy contents of
artifacts/Windows/Configinto the commerce-pay-ncr projectcommerce/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)
-
Copy the file
artifacts/Windows/Config/DeviceConnectionService.xmlinto the commerce-pay-ncr projectcommerce/commerce-pay-ncr/src/main/resources/ncr/mx925/Config/ -
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"/>
-
-
Update the version number in the
WindowsNCRTest.testGetSourceVersion() -
Restart commerce and validate that the new version of NCR Common Client was used and is able to succesfully initialize.
Android¶
-
Extract nupkg file from the NCR download
-
Copy the extracted file
artifacts/Android/clang/CommonClient.aarinto thecommerce/commerce-pay-ncrdirectory -
Modify the
commerce/commerce-pay-ncr/ncr.publish.gradlefile to set the new version number for the artifact, e.g.pom.version = "21.9.2328" -
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]:2222in your~/.ssh/known_hostsfile 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
-
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') -
Update the ncr-cordova-plugin version
- nu-cordova/nu-cordova-plugins/ncr-cordova-plugin/package.json
"version": "0.1.8", -
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 addusercommand to associate your npm account with your local npm install. -
nu-cordova/nu-cordova-plugins/ncr-cordova-plugin/
npm publish -
-
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" -
Build the cordova project from the client assemble directory and validate the new build
9. [Optional] If you have problems with your client project not picking up the updated./gradlew cordovaBuildncr-cordova-plugin, try deleting thencr-cordova-plugindir from the cordova project'spluginsdir and running thecordovaBuildagain. -
Commit the changes to both the client cordova project and the
nu-cordova/nu-cordova-plugins/ncr-cordova-pluginproject