Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Ingenico terminal #23

Open
wants to merge 124 commits into
base: master
Choose a base branch
from

Conversation

PeterYanong-Serino
Copy link

@PeterYanong-Serino PeterYanong-Serino commented Mar 3, 2020

Update dotnet-sdk to hanlde Ingenico Terminal.

  • Setup project file
  • Update target framework from 1.3 to 2.0
  • Include System.IO.Ports to PackageReference.
  • Update NetStandard.Library to version 2.0.3

  • Update enum entities
  • Include Ingenico termial to DeviceType enum.
  • Include Cancel and Duplicate in TransactionType

  • Update some code due to Build failed
  • Add Reporting to namespace of this file, cause 'GlobalPayments.Api.Entities' already contains a definition for 'LodgingData'.
  • Build failed due to 'GatewayConfig' does not contain a constructor that takes 1 arguments GlobalPayments.Api.
  • Build failed due to 'AcceptorConfig' is a type, which is not valid in the given context

  • Update for Ingenico needed configuration
  • Added TCP_IP_SERVER in ConnectionModes enum because SDK will run as a Server.
  • Added 9600 Baudrate and Handshake.
  • Added case block for handling Ingeinco devices.

  • Handle BroadcastMessageEventHandler
  • Invoke OnBroadcastMessage event to handle broadcast message from terminal.

  • Added methods in line with IDeviceInterface which is extended for this class.
  • Added GetLastReceipt, GetReport, Completion and enhanced Verify methods.

  • Added methods for request parsing.
  • Added BuildIngenicoRequest, CalculateLRC methods.
  • Create method for calculating header for TCP communication.
  • Create method to get header from terminal data and parsed to int.

  • Broadcase message event hanlder declaration.

  • Added interface methods.
  • Added GetLastReceipt, GetReport, Completion, methods and added summary/description for the methods; GetLastReceipt, GetReport, Sale, Refund, Completion, Verify.

  • Added property for the interface inside this class named; ITerminalReport
  • Added string ReportData as property.

  • Added necessary properties and methods to fulfill the request message frame 3 needed for the Ingenico parameters.
  • Properties; ReportType, CurrencyCode, PaymentMode, TableNumber, ExtendedDataTags.
  • Methods; WithReportType, WithCurrencyCode, WithPaymentMode, WithTableNumber.

  • Added necessary properties and methods to fulfill the request message frame 3 needed for the Ingenico parameters for the Capture method (Hotel Mode Completion).
  • Properties; CurrencyCode, PaymentMode, ExtendedDataTags, AuthCode.
  • Methods; WithCurrencyCode, WithAuthCode.

  • Added properties and methods to identify what command from XML Management will be use
  • Added ReceiptType as property and added builder load method to get what receipt type is use/selected.

  • Handle BroadcastMessageEventHandler
  • Update event to accept code and message parameter.
  • Invoke OnBroadcastMessage event to handle broadcast message from terminal.
  • Implement OnBroadcastMessage event in affected terminal communication interface.

  • Update Terminal Interfaces
  • Handle changed return type of Cancel method for terminal interfaces.

  • Update Terminal Report response
  • Implement ReportData property for Terminal report responses.

  • Added some methods
  • Added SubArray method, to get sub array data.
  • Added IsNull method for checking of null value.

  • Ingenico TCP comm layer
  • Create a new tcp listener that inherits TcpListener class so that can access Active property of Tcp listener.
  • Added this class to communicate with the terminal/Ingenico using TCP/IP comm.

  • Create methods and their contents/functionalities
  • Create functionalities for the ManageTransaction method; to build request using TerminalManageBuilder.
  • Create BuildManageTransaction and BuildRequestMessage to parse the request and send it to Ingenico based on what request procedure they expect.
  • Create IsObjectNullOrEmpty to identify whether the object is null or empty, ValidateExtendedData to validate the extended data used by the user, ReportRequest to process the request in /XMLReport transactions.

  • Override the interface methods created in IDeviceInterface and their contents/functionalities attached in DeviceInterface
  • Added PaymentType for the Sale, Refund, Capture, Authorize, Completion, Verify, and returning the GetLastReceipt and GetReport to their bases

  • Create some constant variable
  • Added REPORT and RECEIPT constant variables in INGENICO_REQ_CMD and added the INGENICO_RESP class. Added ReceiptType, ReportType, PaymentType, PaymentMode, and ExtendedDataTags as enum.

  • Serial Communication
  • Added this class to communicate with the terminal/Ingenico using Serial comm.

  • Create BroadcastMessage response class
  • Create Dictionary of all broadcast code and its message meaning.
  • Parsed response XML data of terminal.
  • Set code and message to broadcast's properties.

  • Handle Cancel response
  • Create cancel response and inherits IgenicoTerminalResponse.
  • Override ParseResponse so that status will change to Cancel specific status.

  • Handle Reverse response
  • Create reverse response and inherits IgenicoTerminalResponse.
  • Override ParseResponse so that status will change to Reverse specific status.

  • Create data response class
  • Create Class to handle data from terminal which is in Rep field
  • Create property for each data to be parsed.
  • Create method for parsing each data in Rep field.

  • Added DeviceResponse class
  • Create IgenicoBaseResponse that inherits IDeviceResponse.
  • Create IngenicoTerminalResponse that inherits IngenicoBaseResponse.
  • Create method for parsing data.

  • Ingenico Terminal Test
  • Create test for each Payment Transaction type using either TCP or Serial connection mode.
  • Create test for each Transcation Management using either TCP or Serial connection mode

peter-yanong and others added 28 commits March 2, 2020 21:29
Update target framework from 1.3 to 2.0
Include System.IO.Ports to PackageReference.
Update NetStandard.Library to version 2.0.3
Include Ingenico termial to DeviceType enum.
Include Cancel and Duplicate in TransactionType
Add Reporting to namespace of this file, cause 'GlobalPayments.Api.Entities' already contains a definition for 'LodgingData'.
Build failed due to 'GatewayConfig' does not contain a constructor that takes 1 arguments GlobalPayments.Api.
Build failed due to 'AcceptorConfig' is a type, which is not valid in the given context
Added TCP_IP_SERVER in ConnectionModes enum because SDK will run as a Server.
Added 9600 Baudrate and Handshake.
Added case block for handling Ingeinco devices.
Invoke OnBroadcastMessage event to handle broadcast message from terminal.
…s class.

Added GetLastReceipt, GetReport, Completion and enhanced Verify methods.
Added BuildIngenicoRequest, CalculateLRC methods.
Create method for calculating header for TCP communication.
Create method to get header from terminal data and parsed to int.
Added GetLastReceipt, GetReport, Completion, methods and added summary/description for the methods; GetLastReceipt, GetReport, Sale, Refund, Completion, Verify.
… frame 3 needed for the Ingenico parameters.

Properties; ReportType, CurrencyCode, PaymentMode, TableNumber, ExtendedDataTags.
Methods; WithReportType, WithCurrencyCode, WithPaymentMode, WithTableNumber.
… frame 3 needed for the Ingenico parameters for the Capture method (Hotel Mode Completion).

Properties; CurrencyCode, PaymentMode, ExtendedDataTags, AuthCode.
Methods; WithCurrencyCode, WithAuthCode.
…ment will be use

Added ReceiptType as property and added builder load method to get what receipt type is use/selected.
Update event to accept code and message parameter.
Invoke OnBroadcastMessage event to handle broadcast message from terminal.
Implement OnBroadcastMessage event in affected terminal communication interface.
Handle changed return type of Cancel method for terminal interfaces.
Implement ReportData property for Terminal report responses.
Added SubArray method, to get sub array data.
Added IsNull method for checking of null value.
Create a new tcp listener that inherits TcpListener class so that can access Active property of Tcp listener.
Added this class to communicate with the terminal/Ingenico using TCP/IP comm.
Create functionalities for the ManageTransaction method; to build request using TerminalManageBuilder.
Create BuildManageTransaction and BuildRequestMessage to parse the request and send it to Ingenico based on what request procedure they expect.
Create IsObjectNullOrEmpty to identify whether the object is null or empty, ValidateExtendedData to validate the extended data used by the user, ReportRequest to process the request in /XMLReport transactions.
…contents/functionalities attached in DeviceInterface

Added PaymentType for the Sale, Refund, Capture, Authorize, Completion, Verify, and returning the GetLastReceipt and GetReport to their bases
Added REPORT and RECEIPT constant variables in INGENICO_REQ_CMD and added the INGENICO_RESP class. Added ReceiptType, ReportType, PaymentType, PaymentMode, and ExtendedDataTags as enum.
Added this class to communicate with the terminal/Ingenico using Serial comm.
Create Dictionary of all broadcast code and its message meaning.
Parsed response XML data of terminal.
Set code and message to broadcast's properties.
Create cancel response and inherits IgenicoTerminalResponse.
Override ParseResponse so that status will change to Cancel specific status.
Create reverse response and inherits IgenicoTerminalResponse.
Override ParseResponse so that status will change to Reverse specific status.
Create Class to handle data from terminal which is in Rep field
Create property for each data to be parsed.
Create method for parsing each data in Rep field.
Create IgenicoBaseResponse that inherits IDeviceResponse.
Create IngenicoTerminalResponse that inherits IngenicoBaseResponse.
Create method for parsing data.
Create test for each Payment Transaction type using either TCP or Serial connection mode.
Create test for each Transcation Management using either TCP or Serial connection mode
@PeterYanong-Serino PeterYanong-Serino marked this pull request as ready for review March 3, 2020 15:30
@PeterYanong-Serino PeterYanong-Serino changed the title Develop Ingenico Terminal Mar 4, 2020
PeterYanong-Serino and others added 30 commits June 24, 2020 23:23
Remove other connection mode option in switch case. Just include only two connection mode for Ingenico.
Remove IsNull method in Extensions.
Remove extra case in BuildMessage method for Ingenico.
Update validation of IsNull implementation
…om ReverseResponse to IngenicoTerminalResponse
Change data type of all amount field in response data from terminal to string.
Use .ToAmount() extension method of string for converting of string data type into decimal.
Move parsing of data in IngenicoBaseResponse.
Move properties from IngenicoTerminalResponse to IngenicoBaseResponse
Enhancement of serial interface; port connection and the whole structure
Add Description attribute in TransactionSubTypes enum.
Update TransactionSubType parsing of TLV Data.
Remove convertion for TransactionSubType
Declare PayAtTableRequestEventHandler
Declare PayAtTableResponse method for initiating that the message to be sent is for Pay@Table request.
Overloaded WithPaymentMode for getting AdditionalMessage value.
Created WithPayAtTableResponseType for getting response type.
Created WithXMLPath method for getting FilePath value.
Created static class for Pay@Table hard-coded response value.
Added PayAtTableRequest in ParseFormat enum.
Created PATRequestType enum for Pay@Table different types of request.
Created PATResponseType enum.
Create PATPaymentMode enum.
…lities is configured on the device that will connect.
Instantiate TerminalAuthBuilder in PayAtTableResponse method.
Assigned parsed value form terminal into Dcc Amount, Currency, and Status.
…ull, cause SDK would just sent a response according to its request.

Handled request message from terminal in analyzeReadData.
Invoke OnPayAtTableRequest event if the data from terminal is from PayAtTable configured terminal.
Created GetTextContent method in the TerminalUtilities for reading content of XML file path.
Create TransactionOutcomeRequest class for parsing Transaction outcome request message.
Update PATRequest to handle TransctionOutcome and XML Data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants