Skip to content

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

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

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

Conversation

@turtletramp
Copy link
Copy Markdown
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.

Loading
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