Skip to content

Hardcoded values bypass the fixtures a merchant configures #102

Description

@BrocksiNet

Follow-up to #101. Two places where a literal overrides what the merchant under test declared through the fixtures, so the value cannot be configured and the test can only pass for the reference server.

1. Three modules hardcode the payment handler

integration_test_utils.get_valid_payment_payload() reads the instrument — including handler_id — from test_data/<fixture>/payment_instruments.csv, which is how a merchant declares the handler it implements. But three modules build their own payload with a literal:

"handler_id": "mock_payment_handler",
  • ap2_test.py:48
  • binding_test.py:51
  • card_credential_test.py:48

A Business must reject an instrument for a handler it does not implement, so rejecting is the correct behaviour and the literal is the defect. Fails ap2_test, binding_test, card_credential_test.

Patch adds a get_handler_id() accessor reading the same CSV with the same fallback:
0005-read-payment-handler-from-fixture.patch

2. The fulfillment update payload omits line_item_ids

shopping/types/fulfillment_method.json marks line_item_ids as "update": "required", and the update payload the suite builds omits it — so a merchant validating its request schema rejects a payload the suite considers valid.

Patch: 0003-update-payload-line-item-ids.patch

Both verified against an independent merchant: with these applied, ap2, binding and card_credential go green.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions