Skip to content

fix: restore versioned list payments and recurring payments - #377

Open
tessstoddard wants to merge 1 commit into
masterfrom
tess/GCU-1345
Open

fix: restore versioned list payments and recurring payments#377
tessstoddard wants to merge 1 commit into
masterfrom
tess/GCU-1345

Conversation

@tessstoddard

@tessstoddard tessstoddard commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary of Changes

Restore list version endpoints for recurring payments and payments. I had to add a cast to the return value so that the xml serializer understands that it is a MdxList or MdxList

Fixes # https://mxcom.atlassian.net/browse/GCU-1345

Public API Additions/Changes

Adds a versioned endpoint for list payment and recurring payment

Downstream Consumer Impact

None. Services that currently have this feature should be getting the default behavior

How Has This Been Tested?

Created a local snapshot and tested

List payments
GET http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/payments
Accept: application/vnd.mx.mdx.v6+json
mx-feature: payments
mx-session-key: 1964e442-7332-4179-aad6-2fcf9818062c
User-Agent: IntelliJ HTTP Client/IntelliJ IDEA 2026.2.1
Accept-Encoding: br, deflate, gzip, x-gzip
Cookie: JSESSIONID=904854845A6123A5D49269722C804483
host: localhost:3009
content-length: 0

HTTP/1.1 200 
Content-Type: application/vnd.mx.mdx.v6+json;charset=UTF-8
Content-Length: 376
Date: Mon, 17 Aug 2026 21:51:31 GMT

{
  "payments": [
    {
      "account_id": "A-1504331-S-70",
      "amount": 5.0,
      "confirmation_id": "97196883",
      "deliver_on": "2026-04-15",
      "id": "2287868051",
      "memo": "",
      "payee_id": "155353959",
      "payee_name": "John 18711736",
      "sent_on": "2026-04-06",
      "status": "QUEUED",
      "user_id": "U-00u3la36x0bbNvPud1d7"
    }
  ]
List payments v20260427
GET http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/payments
Accept: application/vnd.mx.mdx.v6+json;version=20260427
mx-feature: payments
mx-session-key: 1964e442-7332-4179-aad6-2fcf9818062c
User-Agent: IntelliJ HTTP Client/IntelliJ IDEA 2026.2.1
Accept-Encoding: br, deflate, gzip, x-gzip
Cookie: JSESSIONID=904854845A6123A5D49269722C804483
host: localhost:3009
content-length: 0

HTTP/1.1 200 
Content-Type: application/vnd.mx.mdx.v6+json;version=20260427;charset=UTF-8
Content-Length: 744
Date: Mon, 17 Aug 2026 21:57:34 GMT

{
  "payments": [
    {
      "account_id": "A-1504331-S-70",
      "amount": 7.04,
      "confirmation_id": "96495149",
      "deliver_on": "2078-01-09",
      "id": "16089763",
      "memo": "Updated memo",
      "payee_id": "155353959",
      "payee_name": "John 18711736",
      "sent_on": "2077-12-30",
      "status": "SUBMITTED",
      "user_id": "U-00u3la36x0bbNvPud1d7"
    },
    {
      "account_id": "A-1504331-S-70",
      "amount": 5.0,
      "confirmation_id": "97196883",
      "deliver_on": "2026-04-15",
      "id": "2287868051",
      "memo": "",
      "payee_id": "155353959",
      "payee_name": "John 18711736",
      "sent_on": "2026-04-06",
      "status": "QUEUED",
      "user_id": "U-00u3la36x0bbNvPud1d7"
    }
  ]
}
List recurring payments
GET http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/recurring_payments
Accept: application/vnd.mx.mdx.v6+json
mx-feature: payments
mx-session-key: 1964e442-7332-4179-aad6-2fcf9818062c
User-Agent: IntelliJ HTTP Client/IntelliJ IDEA 2026.2.1
Accept-Encoding: br, deflate, gzip, x-gzip
Cookie: JSESSIONID=904854845A6123A5D49269722C804483
host: localhost:3009
content-length: 0

HTTP/1.1 200 
Content-Type: application/vnd.mx.mdx.v6+json;charset=UTF-8
Content-Length: 459
Date: Mon, 17 Aug 2026 21:58:13 GMT

{
  "recurring_payments": [
    {
      "id": "16089763",
      "confirmation_id": "96495149",
      "account_id": "A-1504331-S-70",
      "payee_id": "155353959",
      "payee_name": "John 18711736",
      "frequency_id": "DEFAULT",
      "status": "ACTIVE",
      "amount": 7.04,
      "memo": "Updated memo",
      "end_after_count": 1,
      "payments_count": 0,
      "next_payment_on": "2078-01-09",
      "user_id": "U-00u3la36x0bbNvPud1d7"
    }
  ]
}
List recurring payments v20260427
GET http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/recurring_payments
Accept: application/vnd.mx.mdx.v6+json;version=20260427
mx-feature: payments
mx-session-key: 1964e442-7332-4179-aad6-2fcf9818062c
User-Agent: IntelliJ HTTP Client/IntelliJ IDEA 2026.2.1
Accept-Encoding: br, deflate, gzip, x-gzip
Cookie: JSESSIONID=904854845A6123A5D49269722C804483
host: localhost:3009
content-length: 0

HTTP/1.1 200 
Content-Type: application/vnd.mx.mdx.v6+json;version=20260427;charset=UTF-8
Content-Length: 30
Date: Mon, 17 Aug 2026 21:59:23 GMT

{
  "recurring_payments": []
}
GCU payment arsenal tests passing
Request 'Authenticate' POST http://localhost:3009/globalcu/authentications
Request 'List payment accounts' GET http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/accounts/payment
Request 'List merchants' GET http://localhost:3009/globalcu/merchants?name=comcast
Request 'Create payee' POST http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/payees
Request 'Create merchant payee' POST http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/payees
Request 'List payees' GET http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/payees
Request 'Get payee' GET http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/payees/156357425
Request 'Update payee' PUT http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/payees/156357425
Request 'Update merchant payee' PUT http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/payees/156357426
Request 'List recurring payment frequencies' GET http://localhost:3009/globalcu/recurring_payments/frequencies
Request 'Create recurring payment' POST http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/recurring_payments
Request 'List recurring payments' GET http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/recurring_payments
Request 'Get recurring payment' GET http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/recurring_payments/17043587
Request 'Update recurring payment' PUT http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/recurring_payments/17043587
Request 'Update recurring payment to one time' PUT http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/recurring_payments/17043587
Request 'Cancel recurring payment' PUT http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/recurring_payments/17043587/cancel
Request 'Ensure recurring payment is cancelled' GET http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/recurring_payments
Request 'Create payment' POST http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/payments
Request 'List payments' GET http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/payments
Request 'Update payment' PUT http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/payments/17043588
Request 'Cancel payment' PUT http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/payments/17043588/cancel
Request 'Ensure payment is cancelled' GET http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/payments
Request 'Delete payee' DELETE http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/payees/156357425
Request 'Ensure payee is deleted' GET http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/payees
Request 'Delete merchant payee' DELETE http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/payees/156357426
Request 'Ensure merchant payee is deleted' GET http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/payees
Request 'Log out' DELETE http://localhost:3009/globalcu/authentications/e5f4f3d0-1d17-42c0-9315-881d803ce09a


27 requests completed, 0 have failed tests
RUN SUCCESSFUL

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

@mattnichols

Copy link
Copy Markdown
Collaborator

What is the reason for the new version? From what I can tell, there isn't a difference between the models, which is typical.

@tessstoddard

tessstoddard commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

What is the reason for the new version? From what I can tell, there isn't a difference between the models, which is typical.

@mattnichols for sure, that's usually the reason for using the versioned endpoints. Basically, nextgen is trying to standardize all these transfer features. But doing that breaks Helios behavior for payments. And there is no reliable way for the backend to know if requests are coming from nextgen vs helios. So that is why we decided on versioned endpoints. The model is the same but the behavior is different.

This is the original MR that was approved and merged. I just had to revert it because the serialization wasn't working. So this MR reenables this with the serialization fix #371

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.

2 participants