Upgrade NuGet DLL to API for COPS
DevOps PBI 196345 Upgrade NuGet DLL to API for COPS
Background:
GALRO currently uses NuGet TCCOPS.dll for COPS. It needs to be updated to use an API for COPS because Moneris will stop processing payments with COPS systems that use the DLL in October.
There is a “hard” deadline for this work to be completed: September 20, 2022. |
---|
Payments using the TCCOPS DLL already disabled in the GALRO development and acceptance environments, prior to any deployments to those environments with the TCCOPS API changes. This was confirmed by Elad.
I attempted to test the existing payment process on GALRO development on Friday, August 19th, 2022
See task 196794 Baseline test of behaviour of GALRO - TCOPS in Development environment.The updated code was not yet deployed to Acceptance as of August 25, 2022 and it was not possible to pay for a Mark. The result is the same as per task 196794 Baseline test of behaviour of GALRO - TCOPS in Development environment.
Solution
Visual Studio version used
We used VS 2022.
Getting GALRO running locally:
Please refer to the instructions regarding getting GALRO running locally on the main GALRO external page under "Debug project".
As a general note, the only step that appears to be required at this time is to ensure that the template is present. Refer to the section mentioned above: "Debug project".
It was also necessary to update the SourceSystemKey token entry in web.config because the existing one contained a “+” sign.
I have made this change in the web.config that is used on localhost and this has been merged into the GALRO repos.
Removal of references to TCCOPS.dll
The reference to TCCOPS had to be removed from NuGET and we had to make sure there are no other references to it in the code.
Refer to task 198110 Remove reference to TCCOPS.dll in NuGet
Conversion of Modules and Helpers for Token API
We converted the required helper files from C# to VB.net using the Telerik code converter ( Code Converter C# to VB and VB to C# – Telerik ) The TokenUtility was originally converted from c# to vb too but did not work. See the section “TokenUtility” for the link to the task covering it.
The source link, from Marine, is: https://dev.azure.com/transport-canada/DSD-Internal%20Services-Finance/_git/MVR
We used this code converter: Code Converter C# to VB and VB to C# – Telerik
See also task 196786: Create the required model and helper files to support the COPS API in GALRO
I also added the documentation/comments to our new GALRO Helper and Module files
see task 196787 Add the documentation/comments to the files for COPS API - GALRO
TokenUtility
The TokenUtility was created in C# since the converted vb version did not work properly.
Please refer to task 198073 TokenUtility in C# (instead of VB)
Payments
See Moneris for card numbers to test with.
I use 1234 as the expiry date.
The CVV code can be anything.
Here is a document with some information, including a couple card numbers I used when I was testing RPAS https://tcmarin.atlassian.net/wiki/spaces/FTT/pages/2491023435/TCOPs+test+info
TCCOPS error Codes
When an error occurs in TCCOPS you will see an error such as “Moose”, “Eagle”, etc.
These codes are only documented within the TCCOPS repos.
TCCOPS is not a CIVIL aviation applications. For assistance resolving TCCOPS error codes, please reach out to Elad Shalom/TCCOPS team.
For contact information about the COPS see https://tcmarin.atlassian.net/wiki/spaces/CA/pages/2369847312/COPS+-+Common+Online+Payment+System7
Developer testing:
The relevant database info is found in CCARCS (a key table is authorization)
CARS/CCARCSD.World.
see task 196806 Developer testing of GALRO where I have outlined some recommendations for the testing.
UAT Testing (Acceptance):
see task 196809 UAT testing on acceptance
Publishing / Deploying
Please see the publish project section on the External GALRO page and the following tasks:
Development: 196808 Deploy to Develpment
Acceptance: 198185 Deploy to acceptance...
The web config
It was necessary to update SourceSystem Key value on localhost, dev and acceptance. I expect it will also have to be done on Acceptance. Please refer to the following tasks:
Localhost: 198139: webconfig - update the SourceSystemKey entry on local host
Development: 198142: webconfig - verify / update the SourceSystemKey entry on development - and update DateAppLastModified date
Acceptance: 198144 webconfig - verify / update the SourceSystemKey entry on acceptance - and update DateAppLastModified date
Production: 198145 webconfig - verify / update the SourceSystemKey entry on prod - and update DateAppLastModified date