Feature/19 implement support for receiptrequestcbterminalid#21
Merged
MaximilianFT merged 4 commits intoMay 18, 2026
Merged
Conversation
…esponse as it is not guaranteed to stay stable in the future
…ue-request-as-it-is-not-final-and-might-change-in-future' into feature/19-implement-support-for-receiptrequestcbterminalid
… payment and receipt issue routing
There was a problem hiding this comment.
Pull request overview
This PR updates the devkit’s POS System API client and samples to consistently use cbTerminalID for terminal routing across payment and receipt flows, and improves delivery-response debug handling.
Changes:
- Standardizes terminal ID naming from
cbTerminalIdtocbTerminalIDacross request DTOs and call sites, and addscbTerminalIDtoReceiptRequest. - Updates sample programs to prompt for
cbTerminalIDat runtime (defaulting toterm1) and passes it through payment + receipt issuance. - Refactors
IssueDeliveredResponseto use a properly-casedMessageproperty and allow additional JSON fields via extension data.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| libPosSystemAPI/PosAPIClient/PosAPIPay.cs | Changes default terminal ID behavior and maps to cbTerminalID in PaymentRequest. |
| libPosSystemAPI/ftPosAPIRunner.cs | Updates payment request building to use cbTerminalID. |
| libPosSystemAPI/DTO/PaymentRequest.cs | Renames terminal property to cbTerminalID for correct JSON field naming. |
| libPosSystemAPI/DTO/RefundCancelRequest.cs | Renames terminal property to cbTerminalID. |
| libPosSystemAPI/DTO/ReceiptRequest.cs | Adds/activates cbTerminalID serialization on receipt requests. |
| libPosSystemAPI/DTO/IssueDeliveredResponse.cs | Refactors delivery response DTO (but currently introduces a compile error). |
| HOWTO_01_Payment_csharp/Program.cs | Prompts for and uses cbTerminalID; updates commentary (one comment now misleading). |
| HOWTO_08_pay_sign_issue_csharp/Program.cs | Prompts for and uses cbTerminalID in pay + sign/issue flow; updates delivery logging. |
| .gitignore | Ignores *.lscache files. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /// alongside the known properties. | ||
| /// </summary> | ||
| [JsonExtensionData] | ||
| public Dictionary<string, object?>? AdditionalProperties { get; set; } } |
Comment on lines
26
to
36
| @@ -32,7 +32,7 @@ public async Task<ExecutedResult<PayResponse>> PaymentAsync(PayItemRequest cbPay | |||
| Action = PayAction.payment, | |||
| Protocol = protocol, | |||
| cbPayItem = cbPayItem, | |||
| cbTerminalId = terminalID, | |||
| cbTerminalID = terminalID, | |||
| }; | |||
| public string? cbTerminalId { get; set; } | ||
| /// <summary> | ||
| /// Allows to identify a specific target device/terminal or group that should process the request. | ||
| /// </summary> |
Comment on lines
+68
to
69
| // - the terminal ID is defined here ("term1") so the request will be processed by the specified terminal (if the terminal is configured also with a terminal ID) | ||
| // IMPORTANT: In a real setup you might want to define a specific terminal ID here to target a specific payment terminal device; especially when multiple payment terminals are registered for the same cashbox! |
deboragracio
approved these changes
May 15, 2026
MaximilianFT
approved these changes
May 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
based on #20 which should be reviewed and merged first to simplify this PR
This pull request introduces improvements to how terminal IDs are handled throughout the payment and receipt flows, ensuring consistent naming and usage of
cbTerminalIDacross DTOs and API calls. It also enhances user experience by prompting for the terminal ID at runtime and improves debugging information for delivery responses.Terminal ID handling and consistency:
cbTerminalID(fromcbTerminalId) inPaymentRequest,RefundCancelRequest, and related API calls, and updated all usages accordingly for consistency. [1] [2] [3] [4]cbTerminalIDproperty inReceiptRequestand ensured it is included in the request serialization. [1] [2]terminalIDparameter inPosAPIPay.PaymentAsyncto"term1"and updated all sample usages to allow runtime selection of the terminal ID. [1] [2] [3] [4] [5]User experience improvements:
HOWTO_01_Payment_csharp/Program.cs,HOWTO_08_pay_sign_issue_csharp/Program.cs) to let users specify the terminal ID at runtime, defaulting to"term1"if left blank. [1] [2]Debugging and DTO enhancements:
IssueDeliveredResponseto use aMessageproperty (with correct casing and JSON serialization attributes), added support for arbitrary additional properties, and improved logging of delivery details. [1] [2]