Skip to content

#10 added docs about how payment vendor side tip is handled + extend …#11

Merged
deboragracio merged 17 commits intomainfrom
10-tip-handling
Mar 2, 2026
Merged

#10 added docs about how payment vendor side tip is handled + extend …#11
deboragracio merged 17 commits intomainfrom
10-tip-handling

Conversation

@turtletramp
Copy link
Collaborator

This pull request introduces improvements to payment handling, especially around payments that include tips, and enhances logging for better traceability of payment requests and responses. It also updates documentation to explain how to handle tip scenarios and clarifies test and example code to reflect these changes.

Enhancements to payment handling and logging:

  • Improved the Utils.DumpToLogger method in Utils.cs to accept the original PayItemRequest and log both the requested and received amounts, including calculation and display of any included tip amount. The log output is now more structured and easier to read, especially for responses with multiple pay items. [1] [2] [3] [4]
  • Updated usages of Utils.DumpToLogger in payment examples (Program.cs in both HOWTO_01_Payment_csharp and HOWTO_08_pay_sign_issue_csharp) to pass the original payment request, ensuring that logs contain complete context for each payment. [1] [2]

Documentation updates for tip handling:

  • Added a new section to HOWTO_01_Payment_csharp/README.MD explaining how to handle payments where a tip is added by the payment vendor, including a flow example and explanation of how the tip is represented in the response.
  • Updated the main README.MD to reference the new documentation for handling payments with tips, specifically for the test case with code 30000,50.

Code and test clarifications:

  • Refactored payment request creation in example programs to improve clarity and maintainability, ensuring the payment request object is clearly defined and reused. [1] [2]
  • Clarified comments in the integration test to explain that only one pay item is expected unless a tip scenario is tested.

…HOWTO_01 and HOWTO_08 to log the tip information nicely on the console
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request enhances payment handling logging and documentation, specifically focusing on scenarios where payment vendors add tips. The changes improve traceability by logging both requested and received payment amounts and provide comprehensive documentation explaining how tip scenarios work.

Changes:

  • Enhanced Utils.DumpToLogger method to accept optional PayItemRequest parameter and display tip calculations
  • Added detailed documentation in HOWTO_01_Payment_csharp/README.MD explaining payment vendor tip handling with a flow example
  • Refactored payment examples to declare PayItemRequest objects before async operations for better logging context

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
libPosSystemAPI/PosAPIUtils/Utils.cs Enhanced DumpToLogger method to accept optional PayItemRequest parameter and log requested vs received amounts with tip calculations
libPosSystemAPI.Test/IntegrationTestsPayment.cs Simplified test comment to remove tip scenario reference
README.MD Updated test case documentation to reference new tip handling guide
HOWTO_01_Payment_csharp/README.MD Added comprehensive section explaining payment vendor tip handling with flow example
HOWTO_08_pay_sign_issue_csharp/Program.cs Refactored to declare PayItemRequest before async operation and pass to DumpToLogger
HOWTO_01_Payment_csharp/Program.cs Refactored to declare PayItemRequest before async operation and pass to DumpToLogger

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@deboragracio deboragracio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Thomas, here's my review for the text.

- The guest sees a TIP entry screen and adds a tip of 2€
- The guests now pays the full sum of 12€
- The payment app reports a paid amount of 12€ (including 2€ of tip)
- The fiskaltrust InStore App / POS System API does report back the following in the payment response (see also example in the POS System API docs):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should a hyperlink be added to: (see also an example on the POS System API docs)?

MaximilianFT and others added 15 commits March 2, 2026 08:26
Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com>
Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com>
Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com>
Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com>
Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com>
Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com>
Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com>
Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com>
Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com>
Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com>
Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com>
Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com>
Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com>
Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com>
Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com>
@deboragracio deboragracio merged commit 6fea609 into main Mar 2, 2026
1 check passed
@deboragracio deboragracio deleted the 10-tip-handling branch March 2, 2026 08:05
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.

[TIP] extend howtos and docs on how payment vendor side added tip is handled

4 participants