Skip to content

feature/INT-1714 - new payout destination types in payments (network token) - #261

Open
david-ruiz-cko wants to merge 8 commits into
mainfrom
feature/INT-1714
Open

david-ruiz-cko wants to merge 8 commits into
mainfrom
feature/INT-1714

Conversation

@david-ruiz-cko

@david-ruiz-cko david-ruiz-cko commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

This pull request adds comprehensive support for new payout destination types in the payments SDK, specifically for card, network token, and token-based payouts. It introduces new enums and destination classes, enhances documentation, and provides thorough serialization tests to ensure correctness and compatibility with the expected API wire format.

Additions to payout destination types and enums:

  • Introduced PaymentDestinationType enum with expanded values, including network_token, to represent different payout destination types. Also added a new NetworkTokenType enum to specify the type of network token (VTS, MDES, Apple Pay, Google Pay).
  • Added new classes: PaymentRequestCardDestination, PaymentRequestNetworkTokenDestination, and PaymentRequestTokenDestination, each with detailed docstrings and properties matching the API specification for their respective payout types.

Enhancements to payout request modeling:

  • Updated the PayoutRequest class to accept the expanded set of destination types, allowing card payouts to use card, network token, id, or token destinations, and bank payouts to use id or bank account destinations.

Testing and serialization:

  • Added a new test module card_payout_destination_serialization_test.py with extensive tests to verify serialization, enum values, and round-trip encoding/decoding for the new payout destination types, ensuring compliance with the API spec.

Documentation improvements:

  • Added or expanded docstrings on enums and destination classes to clarify their purpose, usage, and required/optional fields, improving code readability and maintainability. [1] [2]

@david-ruiz-cko
david-ruiz-cko requested a review from a team October 28, 2026 16:46
@agent-wall-e

agent-wall-e Bot commented Oct 28, 2026

Copy link
Copy Markdown

🟡 Risk Classification: MINOR

Approval route: AI Review + Human Approval
Rollback controls: Staged rollout + rollback

Classification reasons

  • no_low_class_matched
  • prod_source_modified

Operational gates

  • ✅ jira_ticket (INT-1714)
  • ✅ independent_review

Files analysed: 2


wall-e 2026.06.19-02 · policy 6b4ce2b3b45a…

@agent-wall-e

agent-wall-e Bot commented Oct 28, 2026

Copy link
Copy Markdown
🔬 Debug — why this classification?

Each reason code emitted by the classifier, its source clause in the AI in SDLC Control Framework, and what it means.

Reason code Kind Clause Meaning
no_low_class_matched informational §2.2 (fall-through) None of the deterministic Low classes (§2.2.3, §2.2.4, §2.2.7, docs-only) applied; classifier fell through to LLM evaluation.
prod_source_modified informational §2.1 M7 (informational) At least one file is non-doc, non-test, non-IaC — i.e. application source code was modified.

Kinds:

  • classifying — this rule contributed to the chosen tier.
  • informational — context only; did not by itself decide the tier.

See issue #3 for the proposal to formalise this map as Appendix A of the standards doc.

wall-e 2026.06.19-02 · debug

@agent-wall-e

agent-wall-e Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

🟢 Advisory review: Looks good to me

This PR still needs a human approval — wall-e cannot auto-approve it. For what it's worth, I read the diff and found nothing I'd block on.

Adds network_token payout destination type, a NetworkTokenType enum, new destination/request classes (PaymentRequestCardDestination, PaymentRequestNetworkTokenDestination, PaymentRequestTokenDestination, UnreferencedRefundRequest), a request_unreferenced_refund client method, and comprehensive serialization tests covering all new types. The diff is consistent with its stated intent and no blocking issues are visible.

What I checked

  • The new NETWORK_TOKEN value is correctly added to PaymentDestinationType and its string value 'network_token' is verified by a dedicated test.
  • NetworkTokenType enum covers exactly the four values claimed (vts, mdes, applepay, googlepay) and a test asserts the set is exhaustive.
  • request_unreferenced_refund in payments_client.py correctly POSTs to the same __PAYMENTS_PATH as request_payout, matching the described API shape; two client tests (with and without idempotency key) cover it.
  • The UnreferencedRefundRequest constructor hard-codes payment_type = 'UnreferencedRefund' and the serialization test verifies this literal survives the JSON round-trip.
  • The DRIVING_LICENSE enum value used in the bank payout test fixture maps to 'driving_licence' (note the British spelling) while the sender fixture uses driving_licence — consistency with the enum definition should be confirmed in the untruncated diff, but nothing in the visible diff contradicts it.
  • Fixtures and helper functions are extracted into card_payout_fixtures.py and shared across three test files, reducing duplication and keeping fixtures in sync.
  • No existing tests are removed or weakened; only additive changes are made to test files.

⚠️ The diff was too large to read in full, so this review covers only part of the change.


This is not an approval. wall-e cannot auto-approve this PR — it is an opinion to help whoever does. Advisory review · us.anthropic.claude-sonnet-4-6 · wall-e 2026.06.19-02

@david-ruiz-cko david-ruiz-cko changed the title feature/INT-1714 - network_token as a card payout feature/INT-1714 - new payout destination types in payments Oct 28, 2026
@david-ruiz-cko david-ruiz-cko changed the title feature/INT-1714 - new payout destination types in payments feature/INT-1714 - new payout destination types in payments (network token) Oct 28, 2026
@agent-wall-e

agent-wall-e Bot commented Oct 28, 2026

Copy link
Copy Markdown

🟡 Risk Classification: MINOR

Approval route: AI Review + Human Approval
Rollback controls: Staged rollout + rollback

Classification reasons

  • exceeds_bounded_scope:356>250

Operational gates

  • ✅ jira_ticket (INT-1714)
  • ✅ independent_review

Files analysed: 6


wall-e 2026.06.19-02 · policy 6b4ce2b3b45a…

@agent-wall-e

agent-wall-e Bot commented Oct 28, 2026

Copy link
Copy Markdown
🔬 Debug — why this classification?

Each reason code emitted by the classifier, its source clause in the AI in SDLC Control Framework, and what it means.

Reason code Kind Clause Meaning
exceeds_bounded_scope — 356>250 classifying §2.1 M8 More than 250 non-test, non-doc, non-lockfile lines changed.

Kinds:

  • classifying — this rule contributed to the chosen tier.
  • informational — context only; did not by itself decide the tier.

See issue #3 for the proposal to formalise this map as Appendix A of the standards doc.

wall-e 2026.06.19-02 · debug

@agent-wall-e

agent-wall-e Bot commented Oct 28, 2026

Copy link
Copy Markdown

🟡 Risk Classification: MINOR

Approval route: AI Review + Human Approval
Rollback controls: Staged rollout + rollback

Classification reasons

  • exceeds_bounded_scope:400>250

Operational gates

  • ✅ jira_ticket (INT-1714)
  • ✅ independent_review

Files analysed: 6


wall-e 2026.06.19-02 · policy 6b4ce2b3b45a…

@agent-wall-e

agent-wall-e Bot commented Oct 28, 2026

Copy link
Copy Markdown
🔬 Debug — why this classification?

Each reason code emitted by the classifier, its source clause in the AI in SDLC Control Framework, and what it means.

Reason code Kind Clause Meaning
exceeds_bounded_scope — 400>250 classifying §2.1 M8 More than 250 non-test, non-doc, non-lockfile lines changed.

Kinds:

  • classifying — this rule contributed to the chosen tier.
  • informational — context only; did not by itself decide the tier.

See issue #3 for the proposal to formalise this map as Appendix A of the standards doc.

wall-e 2026.06.19-02 · debug

@agent-wall-e

agent-wall-e Bot commented Oct 28, 2026

Copy link
Copy Markdown

🟡 Risk Classification: MINOR

Approval route: AI Review + Human Approval
Rollback controls: Staged rollout + rollback

Classification reasons

  • exceeds_bounded_scope:403>250

Operational gates

  • ✅ jira_ticket (INT-1714)
  • ✅ independent_review

Files analysed: 6


wall-e 2026.06.19-02 · policy 6b4ce2b3b45a…

@agent-wall-e

agent-wall-e Bot commented Oct 28, 2026

Copy link
Copy Markdown
🔬 Debug — why this classification?

Each reason code emitted by the classifier, its source clause in the AI in SDLC Control Framework, and what it means.

Reason code Kind Clause Meaning
exceeds_bounded_scope — 403>250 classifying §2.1 M8 More than 250 non-test, non-doc, non-lockfile lines changed.

Kinds:

  • classifying — this rule contributed to the chosen tier.
  • informational — context only; did not by itself decide the tier.

See issue #3 for the proposal to formalise this map as Appendix A of the standards doc.

wall-e 2026.06.19-02 · debug

@agent-wall-e

agent-wall-e Bot commented Oct 28, 2026

Copy link
Copy Markdown

🟡 Risk Classification: MINOR

Approval route: AI Review + Human Approval
Rollback controls: Staged rollout + rollback

Classification reasons

  • exceeds_bounded_scope:403>250

Operational gates

  • ✅ jira_ticket (INT-1714)
  • ✅ independent_review

Files analysed: 7


wall-e 2026.06.19-02 · policy 6b4ce2b3b45a…

@agent-wall-e

agent-wall-e Bot commented Oct 28, 2026

Copy link
Copy Markdown
🔬 Debug — why this classification?

Each reason code emitted by the classifier, its source clause in the AI in SDLC Control Framework, and what it means.

Reason code Kind Clause Meaning
exceeds_bounded_scope — 403>250 classifying §2.1 M8 More than 250 non-test, non-doc, non-lockfile lines changed.

Kinds:

  • classifying — this rule contributed to the chosen tier.
  • informational — context only; did not by itself decide the tier.

See issue #3 for the proposal to formalise this map as Appendix A of the standards doc.

wall-e 2026.06.19-02 · debug

@agent-wall-e

agent-wall-e Bot commented Oct 28, 2026

Copy link
Copy Markdown

🟡 Risk Classification: MINOR

Approval route: AI Review + Human Approval
Rollback controls: Staged rollout + rollback

Classification reasons

  • exceeds_bounded_scope:418>250

Operational gates

  • ✅ jira_ticket (INT-1714)
  • ✅ independent_review

Files analysed: 7


wall-e 2026.06.19-02 · policy 6b4ce2b3b45a…

@agent-wall-e

agent-wall-e Bot commented Oct 28, 2026

Copy link
Copy Markdown
🔬 Debug — why this classification?

Each reason code emitted by the classifier, its source clause in the AI in SDLC Control Framework, and what it means.

Reason code Kind Clause Meaning
exceeds_bounded_scope — 418>250 classifying §2.1 M8 More than 250 non-test, non-doc, non-lockfile lines changed.

Kinds:

  • classifying — this rule contributed to the chosen tier.
  • informational — context only; did not by itself decide the tier.

See issue #3 for the proposal to formalise this map as Appendix A of the standards doc.

wall-e 2026.06.19-02 · debug

@agent-wall-e

agent-wall-e Bot commented Oct 28, 2026

Copy link
Copy Markdown

🔴 Risk Classification: MAJOR

Approval route: AI Review + Human Approval Required
Rollback controls: Change-freeze window + documented rollback plan

Classification reasons

  • security_sensitive_path:checkout_sdk/payments/sessions/sessions.py

Operational gates

  • ✅ jira_ticket (INT-1714)
  • ✅ independent_review

Files analysed: 12


wall-e 2026.06.19-02 · policy 6b4ce2b3b45a…

@agent-wall-e

agent-wall-e Bot commented Oct 28, 2026

Copy link
Copy Markdown
🔬 Debug — why this classification?

Each reason code emitted by the classifier, its source clause in the AI in SDLC Control Framework, and what it means.

Reason code Kind Clause Meaning
security_sensitive_path — checkout_sdk/payments/sessions/sessions.py classifying §2.1 M4/M5 Path matched a sensitive pattern (auth, secrets, crypto, PCI, migrations, network IaC).

Kinds:

  • classifying — this rule contributed to the chosen tier.
  • informational — context only; did not by itself decide the tier.

See issue #3 for the proposal to formalise this map as Appendix A of the standards doc.

wall-e 2026.06.19-02 · debug

@agent-wall-e

agent-wall-e Bot commented Oct 28, 2026

Copy link
Copy Markdown

🔴 Risk Classification: MAJOR

Approval route: AI Review + Human Approval Required
Rollback controls: Change-freeze window + documented rollback plan

Classification reasons

  • security_sensitive_path:checkout_sdk/payments/sessions/sessions.py

Operational gates

  • ✅ jira_ticket (INT-1714)
  • ✅ independent_review

Files analysed: 12


wall-e 2026.06.19-02 · policy 6b4ce2b3b45a…

@agent-wall-e

agent-wall-e Bot commented Oct 28, 2026

Copy link
Copy Markdown
🔬 Debug — why this classification?

Each reason code emitted by the classifier, its source clause in the AI in SDLC Control Framework, and what it means.

Reason code Kind Clause Meaning
security_sensitive_path — checkout_sdk/payments/sessions/sessions.py classifying §2.1 M4/M5 Path matched a sensitive pattern (auth, secrets, crypto, PCI, migrations, network IaC).

Kinds:

  • classifying — this rule contributed to the chosen tier.
  • informational — context only; did not by itself decide the tier.

See issue #3 for the proposal to formalise this map as Appendix A of the standards doc.

wall-e 2026.06.19-02 · debug

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant