Skip to content

Conversation

@oana-lolea
Copy link
Contributor

@oana-lolea oana-lolea commented Sep 19, 2025

Changes proposed in this pull request

  • Add card-service and point-of-sale images when pushing to Github registry

Context

Fixes #3652 | RAF-1167

Checklist

  • Related issues linked using fixes #number
  • Tests added/updated
  • Make sure that all checks pass
  • Bruno collection updated (if necessary)
  • Documentation issue created with user-docs label (if necessary)
  • OpenAPI specs updated (if necessary)

@github-actions github-actions bot added the type: ci Changes to the CI label Sep 19, 2025
@github-actions
Copy link

github-actions bot commented Sep 19, 2025

🚀 Performance Test Results

Test Configuration:

  • VUs: 4
  • Duration: 1m0s

Test Metrics:

  • Requests/s: 41.81
  • Iterations/s: 13.96
  • Failed Requests: 0.00% (0 of 2515)
📜 Logs

> [email protected] run-tests:testenv /home/runner/work/rafiki/rafiki/test/performance
> ./scripts/run-tests.sh -e test "-k" "-q" "--vus" "4" "--duration" "1m"

Cloud Nine GraphQL API is up: http://localhost:3101/graphql
Cloud Nine Wallet Address is up: http://localhost:3100/
Happy Life Bank Address is up: http://localhost:4100/
cloud-nine-wallet-test-backend already set
cloud-nine-wallet-test-auth already set
happy-life-bank-test-backend already set
happy-life-bank-test-auth already set
     data_received..................: 908 kB 15 kB/s
     data_sent......................: 1.9 MB 32 kB/s
     http_req_blocked...............: avg=7.29µs   min=2.36µs   med=5.45µs   max=853.59µs p(90)=6.69µs   p(95)=7.21µs  
     http_req_connecting............: avg=642ns    min=0s       med=0s       max=812.64µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=95.01ms  min=8.88ms   med=77.35ms  max=492.51ms p(90)=171.34ms p(95)=193.91ms
       { expected_response:true }...: avg=95.01ms  min=8.88ms   med=77.35ms  max=492.51ms p(90)=171.34ms p(95)=193.91ms
     http_req_failed................: 0.00%  ✓ 0         ✗ 2515
     http_req_receiving.............: avg=98.63µs  min=25.7µs   med=81.21µs  max=1.89ms   p(90)=121.93µs p(95)=158.41µs
     http_req_sending...............: avg=39.27µs  min=11.84µs  med=28.85µs  max=1.56ms   p(90)=44.27µs  p(95)=59.24µs 
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=94.87ms  min=8.77ms   med=77.13ms  max=492.43ms p(90)=171.24ms p(95)=193.79ms
     http_reqs......................: 2515   41.80663/s
     iteration_duration.............: avg=286.17ms min=195.15ms med=273.53ms max=1s       p(90)=354.19ms p(95)=389.3ms 
     iterations.....................: 840    13.963248/s
     vus............................: 4      min=4       max=4 
     vus_max........................: 4      min=4       max=4 

@github-actions github-actions bot added the type: tests Testing related label Sep 22, 2025
@github-actions github-actions bot removed the type: tests Testing related label Sep 23, 2025
"@types/koa-bodyparser": "^4.3.12",
"@types/koa__cors": "^5.0.0",
"@types/koa__router": "^12.0.4",
"@types/node": "^20.14.15",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Needed this so that the pipeline can recognise crypto library.

@oana-lolea oana-lolea marked this pull request as ready for review September 23, 2025 11:24
@oana-lolea oana-lolea requested a review from mkurapov September 23, 2025 11:24
COPY package.json pnpm-workspace.yaml .npmrc ./
COPY packages/card-service/knexfile.js ./packages/card-service/knexfile.js
COPY packages/card-service/package.json ./packages/card-service/package.json
COPY packages/token-introspection/package.json ./packages/token-introspection/package.json
Copy link
Contributor

Choose a reason for hiding this comment

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

Both card-service and POS service don't use the token-introspection, so we can remove it from the Dockerfiles + package.json (and removing build:deps)

description: Card expired or invalid signature
'500':
description: Internal server error
description: 'POS service calls this endpoint to accept a payment request.'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
description: 'POS service calls this endpoint to accept a payment request.'
description: 'POS service calls this endpoint to initiate a payment request.'

@oana-lolea oana-lolea requested a review from mkurapov September 23, 2025 14:04

# For additional paranoia, we make it so that the Rafiki user has no write access to the packages
RUN chown -R :rafiki /home/rafiki/packages
RUN chmod -R 750 /home/rafiki/packages
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we are missing a CMD here to run the app, same thing for the pos-service one

@oana-lolea oana-lolea requested a review from mkurapov September 25, 2025 06:15
@mkurapov
Copy link
Contributor

@oana-lolea if you update pos-card-services branch and backmerge it into yours, you should see the security vulnerability fix there (which will end up passing the Docker Grype Scans)

@oana-lolea oana-lolea merged commit e2d4cde into pos-card-services Sep 29, 2025
32 of 52 checks passed
@oana-lolea oana-lolea deleted the oana/raf-1167 branch September 29, 2025 09:38
mkurapov added a commit that referenced this pull request Oct 31, 2025
* feat: created the backbone for the card service (#3508)

* Created the backbone for the card service

* Format fix

* feat: add card service to docker compose

---------

Co-authored-by: Nathan Lie <[email protected]>

* feat: initialize POS service (#3509)

* feat(wip): pos service

* Completed POS service init

* Added docker files and missing scripts

* Removed editor code after handling conflicts

* Updated docker-compose for cloud 9 localenv and removed unnecessary telemetry command from dockerfile

* Updated docker compose files for c9 and hlb

* Updated ports and env var names from config

* fix: install ts-node-dev, add main script to index.ts

---------

Co-authored-by: Nathan Lie <[email protected]>

* feat(card-service): card payments table (#3514)

* migration & model for card payments

* feat(pos): create merchants table (#3519)

* merchants table migrations and model

* typo

* Docker compose fix (for slower PCs) on localenv (#3522)

* fix(cards-service): add dependencies to package.json (#3530)

* fix(cards-service): add dependencies to package.json

* chore(cards-service): lockfile

* feat: Added CardService client in rafiki backend (#3510)

* feat(pos): pos card services table (#3526)

* merchants table migrations and model

* feat(card-service): introduce testcontainers for database and redis (#3533)

* feat(card-service): add testcontainers setup

* chore(cards-service): lockfile

* feat(cards-service): fix test containers setup

* fix(cards-service): fix type issue

* feat(pos): merchants services (#3528)

* merchant service

* jest setup

* tests

* feat: Integrate Redis client in Card Service for (requestId, posServiceHost) mapping (#3524)

* Integrate Redis client in Card Service for (requestId, posServiceHost) mapping

* remove unused dep

* prettier fix

* Separate logging params from the message itself

* ttl

* prettier fix

* Rewrite redis service tests to use testcontainers instead of mocks

---------

Co-authored-by: Antoniu Neacsu <[email protected]>

* feat(pos): create merchant route (#3538)

* post merchants route

---------

Co-authored-by: Nathan Lie <[email protected]>

* feat(card-service): introduce AuditLogService (#3525)

* feat(card-service): introduce AuditLogService

* feat(card-service): add testcontainers setup

* chore(cards-service): lockfile

* fix service update method and add tests.
card_payemnts migration index added

* chore(cards-service): remove unnecessary app container start in tests

* chore(cards-service): add uuid as a placeholder for open payments tennantId for clarity

* chore(cards-service): format imports

* fix(localenv): add required env vars to docker-compose (#3550)

* feat(point-of-sale): POS Device service (#3548)

* pos device service

* Added algorithm as param on registering device, updated tests so that we check the device obj

* feat(pos): RAF-1121-revoke merchant route (#3553)

* feat(ci/cd): add ci jobs for testing point of sale and card-service (#3554)

[CLOSES RAF-1109](https://linear.app/interledger/issue/RAF-1109/devops-cicd-github-actions-to-test-card-and-pos-service)

* fix: (rafiki backend) Augment Wallet Address response with cardService field (#3552)

* feat: add cardServiceUrl configuration and update related routes

* feat: rename CARD_SERVICE_HOST to CARD_SERVICE_URL for consistency

* fix format

---------

Co-authored-by: HRadry <[email protected]>

* fix(localenv): rename CARD_SERVICE_HOST to CARD_SERVICE_URL

* feat(point-of-sale): added route for registering a POS device (#3555)

* Route for registering a POS device

* Fixed issue addressed in comments, tried to fix the port issue of jest

* Changed test container port to 0, format fix

* fix: typo in route

* feat: bruno calls for creating merchant and registering POS device (#3558)

* feat: [RAF-1083][POS Service]: Add GQL Client for Rafiki BE calls for incoming payment operations  (#3546)

* feat(pos): device revoke (#3560)

* feat(pos): nested routing for devices, device revoke route & error handling

* feat(pos-service): pos devices router and service specific error handling

* feat(pos): test app now uses dynamic ports to avoid jest worker conflicts

* fix(pos): fix tests

* chore(pos-service): PR suggestions

* fix(pos): extend error handling approach to register route in pos devices

* chore(pos): remove unused knex in routes

* chore(pos): rename DeviceRoutes

* chore(pos): pnpm-lock

* chore(pos): format

* feat: added card service client to initiate a payment from pos service (#3535)

* Added card service client to initiate a payment

* feat(backend): Raul/raf 1095 augment outgoing payments for card (#3539)

* feat(backend): add card information to outgoing payment graph ql

* fix(backend): save expiry as string MM/YY

* feature(backend): add mm/yy validation

* fix(backend): run prittier

* fix(backend): comments and set type to table name and relation

* fix(backend): remove unused deps

* feat(backend): add tests for outgoing payments with card details

* fix(backend): fix pr comments

---------

Co-authored-by: Raul Ranete <[email protected]>

* feat(point-of-sale): service for obtaining walletAddress by its url from Rafiki Backend (#3578)

* Added axios call to rafiki backend for getting wallet address by its url

* Handled the case when cardServiceUrl may not be set on wallet address

* feat(card-service): add endpoints to initiate payment and receive payment result (#3547)

* feat(card-service): add endpoints to initiate payment and recieve payment result

* fix: improve open api spec validation

* fix: rename paymetn timeout var and comment terminal cert prop

* fix: add PaymentRouteError

* fix: rename env var and remove deleted prop

* fix(backend): made CARD_SERVICE_URL optional (#3600)

* Made CARD_SERVICE_URL optional

* Created cardService container only if cardServiceUrl is set in config

* Added noop card service when cardServiceUrl is not provided

* Regenerated graphql

* Added warning when CARD_SERVICE_URL is not set

* feat(point-of-sale): POST payment route (#3597)

* Payment route structure

* Added routes test file

* Removed some comments

* Added test for unknown error

* Updated graphql generated files

* feat(backend): publish webhooks to POS service if applicable (#3596)

* feat: created the backbone for the card service (#3508)

* Created the backbone for the card service

* Format fix

* feat: add card service to docker compose

---------

Co-authored-by: Nathan Lie <[email protected]>

* feat: Integrate Redis client in Card Service for (requestId, posServiceHost) mapping (#3524)

* Integrate Redis client in Card Service for (requestId, posServiceHost) mapping

* remove unused dep

* prettier fix

* Separate logging params from the message itself

* ttl

* prettier fix

* Rewrite redis service tests to use testcontainers instead of mocks

---------

Co-authored-by: Antoniu Neacsu <[email protected]>

* feat(point-of-sale): added route for registering a POS device (#3555)

* Route for registering a POS device

* Fixed issue addressed in comments, tried to fix the port issue of jest

* Changed test container port to 0, format fix

* feat(backend): publish webhooks to POS service if applicable

* feat: add column to incoming payment

* fix: tests

* feat: add warn log

* fix: better logger requirements for finalizing webhook recipients

* fix: make open payments default reason for incoming payment initialization

* fix: improve optional env var function

* fix: warn log, better optional env, backfill migration, tests

* fix: rebase bugs

* chore: regenerate lockfile

* chore: regenerate gql

* fix: tests

* fix: remove metadata; better tests

* fix: build errors

* fix: tests, add type file

---------

Co-authored-by: oana-lolea <[email protected]>
Co-authored-by: zeppelin44 <[email protected]>
Co-authored-by: Antoniu Neacsu <[email protected]>

* feat(point-of-sale): handle incoming payment completed webhooks from backend (#3613)

* feat: created the backbone for the card service (#3508)

* Created the backbone for the card service

* Format fix

* feat: add card service to docker compose

---------

Co-authored-by: Nathan Lie <[email protected]>

* feat: initialize POS service (#3509)

* feat(wip): pos service

* Completed POS service init

* Added docker files and missing scripts

* Removed editor code after handling conflicts

* Updated docker-compose for cloud 9 localenv and removed unnecessary telemetry command from dockerfile

* Updated docker compose files for c9 and hlb

* Updated ports and env var names from config

* fix: install ts-node-dev, add main script to index.ts

---------

Co-authored-by: Nathan Lie <[email protected]>

* feat: Integrate Redis client in Card Service for (requestId, posServiceHost) mapping (#3524)

* Integrate Redis client in Card Service for (requestId, posServiceHost) mapping

* remove unused dep

* prettier fix

* Separate logging params from the message itself

* ttl

* prettier fix

* Rewrite redis service tests to use testcontainers instead of mocks

---------

Co-authored-by: Antoniu Neacsu <[email protected]>

* feat(point-of-sale): added route for registering a POS device (#3555)

* Route for registering a POS device

* Fixed issue addressed in comments, tried to fix the port issue of jest

* Changed test container port to 0, format fix

* feat(wip): merge pos-card-services

* feat(point-of-sale): handle incoming payment completed webhooks from backend

* fix: typo, expose incoming payment url in gql

* fix: typo & unintended changes

* chore: regenerate gql

* feat: clean up request map if wehbook times out

---------

Co-authored-by: oana-lolea <[email protected]>
Co-authored-by: zeppelin44 <[email protected]>
Co-authored-by: Antoniu Neacsu <[email protected]>

* fix: test

* feat(card-service): call outgoing payment creation during payment route (#3614)

* feat(card-service): call outgoing payment creation during payment route

* chore: regenerate graphql

* chore: regenerate gql

* chore(backend): remove tenant id from card service path in WA response (#3627)

* chore(point-of-sale): add expiry for incoming payments created by pos service (#3623)

* chore(point-of-sale): add expiry for incoming payments created by pos service

* chore(point-of-sale): use jest timers for incoming payment expiry in tests

* feat(card-service): remove `debitAmount` from outgoing payment creation admin API request (#3632)

* chore(pos, card-service): update generated graphql types

* feat(card-service): remove debitAmount from outgoing payment creation mutation

* feat(backend): add custom webhook URL for POS (#3628)

* feat(backend): add custom webhook URL for POS

* fix(backend): remove fallback webhook URL for POS

* fix(point-of-sale): added bruno script + added missing env variables to local docker compose file (#3629)

* Added bruno script + added missing env variables to local docker containers

* Added missing env variables for card-service

* Sent tenant id to backend for now, updated bruno req, fixed createIncPayment mutation

* Removed unnecessary header

* Fixed a test after mutation update

* Updated generated graphql files

* Fixed connection between payment service calls

* Fixed env variables and mutation type for creating inc payment

* fix: match payment bodies for pos and card service (#3653)

* Matched bodies between pos and card services /payment

* Forgot to stage this

* Fixed test

* Updated graphql types

* feat(card-service, pos-service): updating payment routes with new payload (#3655)

* chore: update docker compose file to make webhook signatures work

* feat(pos): update /payment request payload

* feat(card-service): updating payment handler with new payload

* chore(bruno): update initiate Payment request

* chore: lint OpenAPI

* feat(backend): additional webhook events for outgoing payments (#3651)

* feat(backend): add additional webhook events for outgoing payments

* feat(backend): update webhook recipients logic

* chore(backend): extract funded and cancelled events into a new type

* chore(backend): move IncomingPaymentInitiationReason to separate file

* chore(backend): simplify webhook recipients logic

* feat(backend): Update handling of `OutgoingPaymentCardDetails` (#3658)

* feat(backend): update CardDetailsInput GraphQL type

* feat(backend): update OutgoingPaymentCardDetails model

* feat(backend): start publishing cardDetails in outgoing_payment.created webhook

* chore(backend): remove old expiry check

* test(backend): update outgoing payment resolver test

* chore(backend): remove unused cardDetails from GraphQL API

* test(backend): update outgoing payment resolver test

* chore(backend): update migration to not add already included requestId

* chore(backend): update outgoing payment test

* feat(card-service): update outgoing payment creation with new payload

* test(backend): update outgoing payment test

* fix(backend):  fix webhook resolver filter for OP funded and cancelled events (#3662)

* chore: add sha.js override to fix security vulnerability

* feat(card-service): handle payment cancelled & funded events (#3667)

* feat(card-service): handle payment cancelled & funded events

* feat(card-service): fix tests

* fix: updates to make e2e payment flow work (#3668)

* chore(localenv): add CARD_WEBHOOK_SERVICE_URL to cloud nine wallet backend

* feat(backend): fetch cardDetails during outgoing payment funded and cancelled

* chore(pos): correctly handle response from card service

* test(pos): update card service client test

* chore(card-service): add paymentRoutes to AppServices

* chore(backend): fix withGraphFetched query

* test(pos): remove unused test

* fix(card-service): update payment result type

* chore(card-service): format

---------

Co-authored-by: Max Kurapov <[email protected]>

* chore: add card-service and pos-service image build steps in CI (#3657)

* Added card-service and point-of-sale images when pushing to registry

* Added dockerfile.prod for card-service

* Added spectral to validate card-service open api specs

* Fix on building the packages

* Fixed dockerfile

* Added token-introspection

* trying to fix crypto issue

* Another try to fix card-service pipeline

* Still trying

* Testing if crypto is actually the issue here

* Trying to debug

* Added @types/node so it can see the crypto package

* Updated yaml for card-service, removed unnecessary changes

* Fix format

* Updated axios version of pos

* Added tags to card-service.yaml

* Removed token-introspection from pos and card services

* Added command to run pos and card services in docker file

* chore(point-of-sale): update pos service response structure (#3675)

* chore(point-of-sale): update pos service response structure

* fix: map cleanup in finally block

* feat: add integration test for pos-card flow (#3678)

* added integration test for pos flow

* updated pnpm lock

* Added webhook urls and signature secrets to c9 and hlf env

* Set up hosts for card service and pos for IT

* Added test env to performance test job

* Updated IT structure and test name, removed unnecessary formatting

* Forgot to remove 'card_expired' from result

* Updated result model after merging pos-cards branch

* Used prod docker files for pos and card services, added open api files to card-service build, fixed axios dependency issue

* feat: added sender wallet address to incoming payment (#3705)

* Added sender wallet address to incoming payment

* chore(card,pos-service): update alpine image

* chore(card-service, pos-service): cleanup unused code (#3718)

* chore(point-of-sale): remove merchant service, knex, db connections

* chore(card-service): remove knex, objection, db connection

* chore(localenv): remove db connections for pos and card service

* chore(pos): remove migration folder from dockerfile

* chore(bruno): remove unused POS service APIs

* chore(testenv): remove db connection for card and pos services

* chore(pos, card-service): use core imports from apollo client

* chore(point-of-sale, card-service): update webhook handling (#3725)

* chore(card-service): rename `/payment-event` route to `/webhook`

* chore(point-of-sale): make webhook signature signing optional

* chore(testenv): update CARD_WEBHOOK_SERVICE_URL

* test(point-of-sale): allow optional webhook signature

* feat(point-of-sale): pos service API for getting incoming payments (#3708)

* feat(point-of-sale): API for getting pos service's incoming payments

* fix: tests

* feat: filter out unnecessary fields in response

* chore: bruno collection urls

* feat: include senderWalletAddress in query

* fix: bruno urls

* fix: serialize query params properly for gql requests

* fix: expose tenant id in payment gql requests

* feat: use open payments-esque response format

* feat: include metadata

* feat: remove unnecessary fields

* fix: regenerate gql

* fix: imports

* fix: proper object assign use and pr comments

* feat(backend): add filtering incoming payments by initiatedBy (#3714)

* add filtering incoming payments by initiatedBy

* Added filter to walletAddress.incomingPayments resolver

* added filtering by initiatedBy to also work with notIn

* Added filter to getPage functions

* feat(point-of-sale): filter incoming payments by those initiated by card payemnt (#3734)

* chore(card-service): remove unused components (#3736)

* chore(card-service): remove pos-store

* chore(backend): remove redis from instantiation

* chore: remove unused pos & card service components (#3737)

* chore(testenv): remove port

* chore(localenv): removed card & pos volumes, ports, seed

* chore(card-service): remove init script

* chore(backend): remove unused card service

* chore(backend): remove card expiry from outgoing payment errors

* feat(point-of-sale): add `senderWalletAddress` to incoming payment creation (#3738)

* feat(point-of-sale): add USE_HTTP flag

* feat(point-of-sale): pass in senderWalletAddress into incoming payment creation

* chore(testenv): add USE_HTTP to point-of-sale service

* chore(point-of-sale): update card service client log service name

* test(point-of-sale): update payment route & service tests

---------

Co-authored-by: oana-lolea <[email protected]>
Co-authored-by: Nathan Lie <[email protected]>
Co-authored-by: Arpi Lengyel <[email protected]>
Co-authored-by: Arpi Lengyel <[email protected]>
Co-authored-by: xplicit <[email protected]>
Co-authored-by: zeppelin44 <[email protected]>
Co-authored-by: Antoniu Neacsu <[email protected]>
Co-authored-by: MiguelLescasJorgeSebastian <[email protected]>
Co-authored-by: HRadry <[email protected]>
Co-authored-by: Raul <[email protected]>
Co-authored-by: Raul Ranete <[email protected]>
Co-authored-by: dragosp1011 <[email protected]>
Co-authored-by: Bogdan S <[email protected]>
njlie added a commit that referenced this pull request Nov 19, 2025
* feat: created the backbone for the card service (#3508)

* Created the backbone for the card service

* Format fix

* feat: add card service to docker compose

---------

Co-authored-by: Nathan Lie <[email protected]>

* feat: initialize POS service (#3509)

* feat(wip): pos service

* Completed POS service init

* Added docker files and missing scripts

* Removed editor code after handling conflicts

* Updated docker-compose for cloud 9 localenv and removed unnecessary telemetry command from dockerfile

* Updated docker compose files for c9 and hlb

* Updated ports and env var names from config

* fix: install ts-node-dev, add main script to index.ts

---------

Co-authored-by: Nathan Lie <[email protected]>

* feat(card-service): card payments table (#3514)

* migration & model for card payments

* feat(pos): create merchants table (#3519)

* merchants table migrations and model

* typo

* Docker compose fix (for slower PCs) on localenv (#3522)

* fix(cards-service): add dependencies to package.json (#3530)

* fix(cards-service): add dependencies to package.json

* chore(cards-service): lockfile

* feat: Added CardService client in rafiki backend (#3510)

* feat(pos): pos card services table (#3526)

* merchants table migrations and model

* feat(card-service): introduce testcontainers for database and redis (#3533)

* feat(card-service): add testcontainers setup

* chore(cards-service): lockfile

* feat(cards-service): fix test containers setup

* fix(cards-service): fix type issue

* feat(pos): merchants services (#3528)

* merchant service

* jest setup

* tests

* feat: Integrate Redis client in Card Service for (requestId, posServiceHost) mapping (#3524)

* Integrate Redis client in Card Service for (requestId, posServiceHost) mapping

* remove unused dep

* prettier fix

* Separate logging params from the message itself

* ttl

* prettier fix

* Rewrite redis service tests to use testcontainers instead of mocks

---------

Co-authored-by: Antoniu Neacsu <[email protected]>

* feat(pos): create merchant route (#3538)

* post merchants route

---------

Co-authored-by: Nathan Lie <[email protected]>

* feat(card-service): introduce AuditLogService (#3525)

* feat(card-service): introduce AuditLogService

* feat(card-service): add testcontainers setup

* chore(cards-service): lockfile

* fix service update method and add tests.
card_payemnts migration index added

* chore(cards-service): remove unnecessary app container start in tests

* chore(cards-service): add uuid as a placeholder for open payments tennantId for clarity

* chore(cards-service): format imports

* fix(localenv): add required env vars to docker-compose (#3550)

* feat(point-of-sale): POS Device service (#3548)

* pos device service

* Added algorithm as param on registering device, updated tests so that we check the device obj

* feat(pos): RAF-1121-revoke merchant route (#3553)

* feat(ci/cd): add ci jobs for testing point of sale and card-service (#3554)

[CLOSES RAF-1109](https://linear.app/interledger/issue/RAF-1109/devops-cicd-github-actions-to-test-card-and-pos-service)

* fix: (rafiki backend) Augment Wallet Address response with cardService field (#3552)

* feat: add cardServiceUrl configuration and update related routes

* feat: rename CARD_SERVICE_HOST to CARD_SERVICE_URL for consistency

* fix format

---------

Co-authored-by: HRadry <[email protected]>

* fix(localenv): rename CARD_SERVICE_HOST to CARD_SERVICE_URL

* feat(point-of-sale): added route for registering a POS device (#3555)

* Route for registering a POS device

* Fixed issue addressed in comments, tried to fix the port issue of jest

* Changed test container port to 0, format fix

* fix: typo in route

* feat: bruno calls for creating merchant and registering POS device (#3558)

* feat: [RAF-1083][POS Service]: Add GQL Client for Rafiki BE calls for incoming payment operations  (#3546)

* feat(pos): device revoke (#3560)

* feat(pos): nested routing for devices, device revoke route & error handling

* feat(pos-service): pos devices router and service specific error handling

* feat(pos): test app now uses dynamic ports to avoid jest worker conflicts

* fix(pos): fix tests

* chore(pos-service): PR suggestions

* fix(pos): extend error handling approach to register route in pos devices

* chore(pos): remove unused knex in routes

* chore(pos): rename DeviceRoutes

* chore(pos): pnpm-lock

* chore(pos): format

* feat: added card service client to initiate a payment from pos service (#3535)

* Added card service client to initiate a payment

* feat(backend): Raul/raf 1095 augment outgoing payments for card (#3539)

* feat(backend): add card information to outgoing payment graph ql

* fix(backend): save expiry as string MM/YY

* feature(backend): add mm/yy validation

* fix(backend): run prittier

* fix(backend): comments and set type to table name and relation

* fix(backend): remove unused deps

* feat(backend): add tests for outgoing payments with card details

* fix(backend): fix pr comments

---------

Co-authored-by: Raul Ranete <[email protected]>

* feat(point-of-sale): service for obtaining walletAddress by its url from Rafiki Backend (#3578)

* Added axios call to rafiki backend for getting wallet address by its url

* Handled the case when cardServiceUrl may not be set on wallet address

* feat(card-service): add endpoints to initiate payment and receive payment result (#3547)

* feat(card-service): add endpoints to initiate payment and recieve payment result

* fix: improve open api spec validation

* fix: rename paymetn timeout var and comment terminal cert prop

* fix: add PaymentRouteError

* fix: rename env var and remove deleted prop

* fix(backend): made CARD_SERVICE_URL optional (#3600)

* Made CARD_SERVICE_URL optional

* Created cardService container only if cardServiceUrl is set in config

* Added noop card service when cardServiceUrl is not provided

* Regenerated graphql

* Added warning when CARD_SERVICE_URL is not set

* feat(point-of-sale): POST payment route (#3597)

* Payment route structure

* Added routes test file

* Removed some comments

* Added test for unknown error

* Updated graphql generated files

* feat(backend): publish webhooks to POS service if applicable (#3596)

* feat: created the backbone for the card service (#3508)

* Created the backbone for the card service

* Format fix

* feat: add card service to docker compose

---------

Co-authored-by: Nathan Lie <[email protected]>

* feat: Integrate Redis client in Card Service for (requestId, posServiceHost) mapping (#3524)

* Integrate Redis client in Card Service for (requestId, posServiceHost) mapping

* remove unused dep

* prettier fix

* Separate logging params from the message itself

* ttl

* prettier fix

* Rewrite redis service tests to use testcontainers instead of mocks

---------

Co-authored-by: Antoniu Neacsu <[email protected]>

* feat(point-of-sale): added route for registering a POS device (#3555)

* Route for registering a POS device

* Fixed issue addressed in comments, tried to fix the port issue of jest

* Changed test container port to 0, format fix

* feat(backend): publish webhooks to POS service if applicable

* feat: add column to incoming payment

* fix: tests

* feat: add warn log

* fix: better logger requirements for finalizing webhook recipients

* fix: make open payments default reason for incoming payment initialization

* fix: improve optional env var function

* fix: warn log, better optional env, backfill migration, tests

* fix: rebase bugs

* chore: regenerate lockfile

* chore: regenerate gql

* fix: tests

* fix: remove metadata; better tests

* fix: build errors

* fix: tests, add type file

---------

Co-authored-by: oana-lolea <[email protected]>
Co-authored-by: zeppelin44 <[email protected]>
Co-authored-by: Antoniu Neacsu <[email protected]>

* feat(point-of-sale): handle incoming payment completed webhooks from backend (#3613)

* feat: created the backbone for the card service (#3508)

* Created the backbone for the card service

* Format fix

* feat: add card service to docker compose

---------

Co-authored-by: Nathan Lie <[email protected]>

* feat: initialize POS service (#3509)

* feat(wip): pos service

* Completed POS service init

* Added docker files and missing scripts

* Removed editor code after handling conflicts

* Updated docker-compose for cloud 9 localenv and removed unnecessary telemetry command from dockerfile

* Updated docker compose files for c9 and hlb

* Updated ports and env var names from config

* fix: install ts-node-dev, add main script to index.ts

---------

Co-authored-by: Nathan Lie <[email protected]>

* feat: Integrate Redis client in Card Service for (requestId, posServiceHost) mapping (#3524)

* Integrate Redis client in Card Service for (requestId, posServiceHost) mapping

* remove unused dep

* prettier fix

* Separate logging params from the message itself

* ttl

* prettier fix

* Rewrite redis service tests to use testcontainers instead of mocks

---------

Co-authored-by: Antoniu Neacsu <[email protected]>

* feat(point-of-sale): added route for registering a POS device (#3555)

* Route for registering a POS device

* Fixed issue addressed in comments, tried to fix the port issue of jest

* Changed test container port to 0, format fix

* feat(wip): merge pos-card-services

* feat(point-of-sale): handle incoming payment completed webhooks from backend

* fix: typo, expose incoming payment url in gql

* fix: typo & unintended changes

* chore: regenerate gql

* feat: clean up request map if wehbook times out

---------

Co-authored-by: oana-lolea <[email protected]>
Co-authored-by: zeppelin44 <[email protected]>
Co-authored-by: Antoniu Neacsu <[email protected]>

* fix: test

* feat(card-service): call outgoing payment creation during payment route (#3614)

* feat(card-service): call outgoing payment creation during payment route

* chore: regenerate graphql

* chore: regenerate gql

* chore(backend): remove tenant id from card service path in WA response (#3627)

* chore(point-of-sale): add expiry for incoming payments created by pos service (#3623)

* chore(point-of-sale): add expiry for incoming payments created by pos service

* chore(point-of-sale): use jest timers for incoming payment expiry in tests

* feat(card-service): remove `debitAmount` from outgoing payment creation admin API request (#3632)

* chore(pos, card-service): update generated graphql types

* feat(card-service): remove debitAmount from outgoing payment creation mutation

* feat(backend): add custom webhook URL for POS (#3628)

* feat(backend): add custom webhook URL for POS

* fix(backend): remove fallback webhook URL for POS

* fix(point-of-sale): added bruno script + added missing env variables to local docker compose file (#3629)

* Added bruno script + added missing env variables to local docker containers

* Added missing env variables for card-service

* Sent tenant id to backend for now, updated bruno req, fixed createIncPayment mutation

* Removed unnecessary header

* Fixed a test after mutation update

* Updated generated graphql files

* Fixed connection between payment service calls

* Fixed env variables and mutation type for creating inc payment

* fix: match payment bodies for pos and card service (#3653)

* Matched bodies between pos and card services /payment

* Forgot to stage this

* Fixed test

* Updated graphql types

* feat(card-service, pos-service): updating payment routes with new payload (#3655)

* chore: update docker compose file to make webhook signatures work

* feat(pos): update /payment request payload

* feat(card-service): updating payment handler with new payload

* chore(bruno): update initiate Payment request

* chore: lint OpenAPI

* feat(backend): additional webhook events for outgoing payments (#3651)

* feat(backend): add additional webhook events for outgoing payments

* feat(backend): update webhook recipients logic

* chore(backend): extract funded and cancelled events into a new type

* chore(backend): move IncomingPaymentInitiationReason to separate file

* chore(backend): simplify webhook recipients logic

* feat(backend): Update handling of `OutgoingPaymentCardDetails` (#3658)

* feat(backend): update CardDetailsInput GraphQL type

* feat(backend): update OutgoingPaymentCardDetails model

* feat(backend): start publishing cardDetails in outgoing_payment.created webhook

* chore(backend): remove old expiry check

* test(backend): update outgoing payment resolver test

* chore(backend): remove unused cardDetails from GraphQL API

* test(backend): update outgoing payment resolver test

* chore(backend): update migration to not add already included requestId

* chore(backend): update outgoing payment test

* feat(card-service): update outgoing payment creation with new payload

* test(backend): update outgoing payment test

* fix(backend):  fix webhook resolver filter for OP funded and cancelled events (#3662)

* chore: add sha.js override to fix security vulnerability

* feat(card-service): handle payment cancelled & funded events (#3667)

* feat(card-service): handle payment cancelled & funded events

* feat(card-service): fix tests

* fix: updates to make e2e payment flow work (#3668)

* chore(localenv): add CARD_WEBHOOK_SERVICE_URL to cloud nine wallet backend

* feat(backend): fetch cardDetails during outgoing payment funded and cancelled

* chore(pos): correctly handle response from card service

* test(pos): update card service client test

* chore(card-service): add paymentRoutes to AppServices

* chore(backend): fix withGraphFetched query

* test(pos): remove unused test

* fix(card-service): update payment result type

* chore(card-service): format

---------

Co-authored-by: Max Kurapov <[email protected]>

* chore: add card-service and pos-service image build steps in CI (#3657)

* Added card-service and point-of-sale images when pushing to registry

* Added dockerfile.prod for card-service

* Added spectral to validate card-service open api specs

* Fix on building the packages

* Fixed dockerfile

* Added token-introspection

* trying to fix crypto issue

* Another try to fix card-service pipeline

* Still trying

* Testing if crypto is actually the issue here

* Trying to debug

* Added @types/node so it can see the crypto package

* Updated yaml for card-service, removed unnecessary changes

* Fix format

* Updated axios version of pos

* Added tags to card-service.yaml

* Removed token-introspection from pos and card services

* Added command to run pos and card services in docker file

* chore(point-of-sale): update pos service response structure (#3675)

* chore(point-of-sale): update pos service response structure

* fix: map cleanup in finally block

* feat: add integration test for pos-card flow (#3678)

* added integration test for pos flow

* updated pnpm lock

* Added webhook urls and signature secrets to c9 and hlf env

* Set up hosts for card service and pos for IT

* Added test env to performance test job

* Updated IT structure and test name, removed unnecessary formatting

* Forgot to remove 'card_expired' from result

* Updated result model after merging pos-cards branch

* Used prod docker files for pos and card services, added open api files to card-service build, fixed axios dependency issue

* feat: added sender wallet address to incoming payment (#3705)

* Added sender wallet address to incoming payment

* chore(card,pos-service): update alpine image

* chore(card-service, pos-service): cleanup unused code (#3718)

* chore(point-of-sale): remove merchant service, knex, db connections

* chore(card-service): remove knex, objection, db connection

* chore(localenv): remove db connections for pos and card service

* chore(pos): remove migration folder from dockerfile

* chore(bruno): remove unused POS service APIs

* chore(testenv): remove db connection for card and pos services

* chore(pos, card-service): use core imports from apollo client

* chore(point-of-sale, card-service): update webhook handling (#3725)

* chore(card-service): rename `/payment-event` route to `/webhook`

* chore(point-of-sale): make webhook signature signing optional

* chore(testenv): update CARD_WEBHOOK_SERVICE_URL

* test(point-of-sale): allow optional webhook signature

* feat(point-of-sale): pos service API for getting incoming payments (#3708)

* feat(point-of-sale): API for getting pos service's incoming payments

* fix: tests

* feat: filter out unnecessary fields in response

* chore: bruno collection urls

* feat: include senderWalletAddress in query

* fix: bruno urls

* fix: serialize query params properly for gql requests

* fix: expose tenant id in payment gql requests

* feat: use open payments-esque response format

* feat: include metadata

* feat: remove unnecessary fields

* fix: regenerate gql

* fix: imports

* fix: proper object assign use and pr comments

* feat(backend): add filtering incoming payments by initiatedBy (#3714)

* add filtering incoming payments by initiatedBy

* Added filter to walletAddress.incomingPayments resolver

* added filtering by initiatedBy to also work with notIn

* Added filter to getPage functions

* feat(point-of-sale): filter incoming payments by those initiated by card payemnt (#3734)

* chore(card-service): remove unused components (#3736)

* chore(card-service): remove pos-store

* chore(backend): remove redis from instantiation

* chore: remove unused pos & card service components (#3737)

* chore(testenv): remove port

* chore(localenv): removed card & pos volumes, ports, seed

* chore(card-service): remove init script

* chore(backend): remove unused card service

* chore(backend): remove card expiry from outgoing payment errors

* feat(point-of-sale): add `senderWalletAddress` to incoming payment creation (#3738)

* feat(point-of-sale): add USE_HTTP flag

* feat(point-of-sale): pass in senderWalletAddress into incoming payment creation

* chore(testenv): add USE_HTTP to point-of-sale service

* chore(point-of-sale): update card service client log service name

* test(point-of-sale): update payment route & service tests

---------

Co-authored-by: oana-lolea <[email protected]>
Co-authored-by: Nathan Lie <[email protected]>
Co-authored-by: Arpi Lengyel <[email protected]>
Co-authored-by: Arpi Lengyel <[email protected]>
Co-authored-by: xplicit <[email protected]>
Co-authored-by: zeppelin44 <[email protected]>
Co-authored-by: Antoniu Neacsu <[email protected]>
Co-authored-by: MiguelLescasJorgeSebastian <[email protected]>
Co-authored-by: HRadry <[email protected]>
Co-authored-by: Raul <[email protected]>
Co-authored-by: Raul Ranete <[email protected]>
Co-authored-by: dragosp1011 <[email protected]>
Co-authored-by: Bogdan S <[email protected]>
njlie added a commit that referenced this pull request Nov 20, 2025
* feat: created the backbone for the card service (#3508)

* Created the backbone for the card service

* Format fix

* feat: add card service to docker compose

---------

Co-authored-by: Nathan Lie <[email protected]>

* feat: initialize POS service (#3509)

* feat(wip): pos service

* Completed POS service init

* Added docker files and missing scripts

* Removed editor code after handling conflicts

* Updated docker-compose for cloud 9 localenv and removed unnecessary telemetry command from dockerfile

* Updated docker compose files for c9 and hlb

* Updated ports and env var names from config

* fix: install ts-node-dev, add main script to index.ts

---------

Co-authored-by: Nathan Lie <[email protected]>

* feat(card-service): card payments table (#3514)

* migration & model for card payments

* feat(pos): create merchants table (#3519)

* merchants table migrations and model

* typo

* Docker compose fix (for slower PCs) on localenv (#3522)

* fix(cards-service): add dependencies to package.json (#3530)

* fix(cards-service): add dependencies to package.json

* chore(cards-service): lockfile

* feat: Added CardService client in rafiki backend (#3510)

* feat(pos): pos card services table (#3526)

* merchants table migrations and model

* feat(card-service): introduce testcontainers for database and redis (#3533)

* feat(card-service): add testcontainers setup

* chore(cards-service): lockfile

* feat(cards-service): fix test containers setup

* fix(cards-service): fix type issue

* feat(pos): merchants services (#3528)

* merchant service

* jest setup

* tests

* feat: Integrate Redis client in Card Service for (requestId, posServiceHost) mapping (#3524)

* Integrate Redis client in Card Service for (requestId, posServiceHost) mapping

* remove unused dep

* prettier fix

* Separate logging params from the message itself

* ttl

* prettier fix

* Rewrite redis service tests to use testcontainers instead of mocks

---------

Co-authored-by: Antoniu Neacsu <[email protected]>

* feat(pos): create merchant route (#3538)

* post merchants route

---------

Co-authored-by: Nathan Lie <[email protected]>

* feat(card-service): introduce AuditLogService (#3525)

* feat(card-service): introduce AuditLogService

* feat(card-service): add testcontainers setup

* chore(cards-service): lockfile

* fix service update method and add tests.
card_payemnts migration index added

* chore(cards-service): remove unnecessary app container start in tests

* chore(cards-service): add uuid as a placeholder for open payments tennantId for clarity

* chore(cards-service): format imports

* fix(localenv): add required env vars to docker-compose (#3550)

* feat(point-of-sale): POS Device service (#3548)

* pos device service

* Added algorithm as param on registering device, updated tests so that we check the device obj

* feat(pos): RAF-1121-revoke merchant route (#3553)

* feat(ci/cd): add ci jobs for testing point of sale and card-service (#3554)

[CLOSES RAF-1109](https://linear.app/interledger/issue/RAF-1109/devops-cicd-github-actions-to-test-card-and-pos-service)

* fix: (rafiki backend) Augment Wallet Address response with cardService field (#3552)

* feat: add cardServiceUrl configuration and update related routes

* feat: rename CARD_SERVICE_HOST to CARD_SERVICE_URL for consistency

* fix format

---------

Co-authored-by: HRadry <[email protected]>

* fix(localenv): rename CARD_SERVICE_HOST to CARD_SERVICE_URL

* feat(point-of-sale): added route for registering a POS device (#3555)

* Route for registering a POS device

* Fixed issue addressed in comments, tried to fix the port issue of jest

* Changed test container port to 0, format fix

* fix: typo in route

* feat: bruno calls for creating merchant and registering POS device (#3558)

* feat: [RAF-1083][POS Service]: Add GQL Client for Rafiki BE calls for incoming payment operations  (#3546)

* feat(pos): device revoke (#3560)

* feat(pos): nested routing for devices, device revoke route & error handling

* feat(pos-service): pos devices router and service specific error handling

* feat(pos): test app now uses dynamic ports to avoid jest worker conflicts

* fix(pos): fix tests

* chore(pos-service): PR suggestions

* fix(pos): extend error handling approach to register route in pos devices

* chore(pos): remove unused knex in routes

* chore(pos): rename DeviceRoutes

* chore(pos): pnpm-lock

* chore(pos): format

* feat: added card service client to initiate a payment from pos service (#3535)

* Added card service client to initiate a payment

* feat(backend): Raul/raf 1095 augment outgoing payments for card (#3539)

* feat(backend): add card information to outgoing payment graph ql

* fix(backend): save expiry as string MM/YY

* feature(backend): add mm/yy validation

* fix(backend): run prittier

* fix(backend): comments and set type to table name and relation

* fix(backend): remove unused deps

* feat(backend): add tests for outgoing payments with card details

* fix(backend): fix pr comments

---------

Co-authored-by: Raul Ranete <[email protected]>

* feat(point-of-sale): service for obtaining walletAddress by its url from Rafiki Backend (#3578)

* Added axios call to rafiki backend for getting wallet address by its url

* Handled the case when cardServiceUrl may not be set on wallet address

* feat(card-service): add endpoints to initiate payment and receive payment result (#3547)

* feat(card-service): add endpoints to initiate payment and recieve payment result

* fix: improve open api spec validation

* fix: rename paymetn timeout var and comment terminal cert prop

* fix: add PaymentRouteError

* fix: rename env var and remove deleted prop

* fix(backend): made CARD_SERVICE_URL optional (#3600)

* Made CARD_SERVICE_URL optional

* Created cardService container only if cardServiceUrl is set in config

* Added noop card service when cardServiceUrl is not provided

* Regenerated graphql

* Added warning when CARD_SERVICE_URL is not set

* feat(point-of-sale): POST payment route (#3597)

* Payment route structure

* Added routes test file

* Removed some comments

* Added test for unknown error

* Updated graphql generated files

* feat(backend): publish webhooks to POS service if applicable (#3596)

* feat: created the backbone for the card service (#3508)

* Created the backbone for the card service

* Format fix

* feat: add card service to docker compose

---------

Co-authored-by: Nathan Lie <[email protected]>

* feat: Integrate Redis client in Card Service for (requestId, posServiceHost) mapping (#3524)

* Integrate Redis client in Card Service for (requestId, posServiceHost) mapping

* remove unused dep

* prettier fix

* Separate logging params from the message itself

* ttl

* prettier fix

* Rewrite redis service tests to use testcontainers instead of mocks

---------

Co-authored-by: Antoniu Neacsu <[email protected]>

* feat(point-of-sale): added route for registering a POS device (#3555)

* Route for registering a POS device

* Fixed issue addressed in comments, tried to fix the port issue of jest

* Changed test container port to 0, format fix

* feat(backend): publish webhooks to POS service if applicable

* feat: add column to incoming payment

* fix: tests

* feat: add warn log

* fix: better logger requirements for finalizing webhook recipients

* fix: make open payments default reason for incoming payment initialization

* fix: improve optional env var function

* fix: warn log, better optional env, backfill migration, tests

* fix: rebase bugs

* chore: regenerate lockfile

* chore: regenerate gql

* fix: tests

* fix: remove metadata; better tests

* fix: build errors

* fix: tests, add type file

---------

Co-authored-by: oana-lolea <[email protected]>
Co-authored-by: zeppelin44 <[email protected]>
Co-authored-by: Antoniu Neacsu <[email protected]>

* feat(point-of-sale): handle incoming payment completed webhooks from backend (#3613)

* feat: created the backbone for the card service (#3508)

* Created the backbone for the card service

* Format fix

* feat: add card service to docker compose

---------

Co-authored-by: Nathan Lie <[email protected]>

* feat: initialize POS service (#3509)

* feat(wip): pos service

* Completed POS service init

* Added docker files and missing scripts

* Removed editor code after handling conflicts

* Updated docker-compose for cloud 9 localenv and removed unnecessary telemetry command from dockerfile

* Updated docker compose files for c9 and hlb

* Updated ports and env var names from config

* fix: install ts-node-dev, add main script to index.ts

---------

Co-authored-by: Nathan Lie <[email protected]>

* feat: Integrate Redis client in Card Service for (requestId, posServiceHost) mapping (#3524)

* Integrate Redis client in Card Service for (requestId, posServiceHost) mapping

* remove unused dep

* prettier fix

* Separate logging params from the message itself

* ttl

* prettier fix

* Rewrite redis service tests to use testcontainers instead of mocks

---------

Co-authored-by: Antoniu Neacsu <[email protected]>

* feat(point-of-sale): added route for registering a POS device (#3555)

* Route for registering a POS device

* Fixed issue addressed in comments, tried to fix the port issue of jest

* Changed test container port to 0, format fix

* feat(wip): merge pos-card-services

* feat(point-of-sale): handle incoming payment completed webhooks from backend

* fix: typo, expose incoming payment url in gql

* fix: typo & unintended changes

* chore: regenerate gql

* feat: clean up request map if wehbook times out

---------

Co-authored-by: oana-lolea <[email protected]>
Co-authored-by: zeppelin44 <[email protected]>
Co-authored-by: Antoniu Neacsu <[email protected]>

* fix: test

* feat(card-service): call outgoing payment creation during payment route (#3614)

* feat(card-service): call outgoing payment creation during payment route

* chore: regenerate graphql

* chore: regenerate gql

* chore(backend): remove tenant id from card service path in WA response (#3627)

* chore(point-of-sale): add expiry for incoming payments created by pos service (#3623)

* chore(point-of-sale): add expiry for incoming payments created by pos service

* chore(point-of-sale): use jest timers for incoming payment expiry in tests

* feat(card-service): remove `debitAmount` from outgoing payment creation admin API request (#3632)

* chore(pos, card-service): update generated graphql types

* feat(card-service): remove debitAmount from outgoing payment creation mutation

* feat(backend): add custom webhook URL for POS (#3628)

* feat(backend): add custom webhook URL for POS

* fix(backend): remove fallback webhook URL for POS

* fix(point-of-sale): added bruno script + added missing env variables to local docker compose file (#3629)

* Added bruno script + added missing env variables to local docker containers

* Added missing env variables for card-service

* Sent tenant id to backend for now, updated bruno req, fixed createIncPayment mutation

* Removed unnecessary header

* Fixed a test after mutation update

* Updated generated graphql files

* Fixed connection between payment service calls

* Fixed env variables and mutation type for creating inc payment

* fix: match payment bodies for pos and card service (#3653)

* Matched bodies between pos and card services /payment

* Forgot to stage this

* Fixed test

* Updated graphql types

* feat(card-service, pos-service): updating payment routes with new payload (#3655)

* chore: update docker compose file to make webhook signatures work

* feat(pos): update /payment request payload

* feat(card-service): updating payment handler with new payload

* chore(bruno): update initiate Payment request

* chore: lint OpenAPI

* feat(backend): additional webhook events for outgoing payments (#3651)

* feat(backend): add additional webhook events for outgoing payments

* feat(backend): update webhook recipients logic

* chore(backend): extract funded and cancelled events into a new type

* chore(backend): move IncomingPaymentInitiationReason to separate file

* chore(backend): simplify webhook recipients logic

* feat(backend): Update handling of `OutgoingPaymentCardDetails` (#3658)

* feat(backend): update CardDetailsInput GraphQL type

* feat(backend): update OutgoingPaymentCardDetails model

* feat(backend): start publishing cardDetails in outgoing_payment.created webhook

* chore(backend): remove old expiry check

* test(backend): update outgoing payment resolver test

* chore(backend): remove unused cardDetails from GraphQL API

* test(backend): update outgoing payment resolver test

* chore(backend): update migration to not add already included requestId

* chore(backend): update outgoing payment test

* feat(card-service): update outgoing payment creation with new payload

* test(backend): update outgoing payment test

* fix(backend):  fix webhook resolver filter for OP funded and cancelled events (#3662)

* chore: add sha.js override to fix security vulnerability

* feat(card-service): handle payment cancelled & funded events (#3667)

* feat(card-service): handle payment cancelled & funded events

* feat(card-service): fix tests

* fix: updates to make e2e payment flow work (#3668)

* chore(localenv): add CARD_WEBHOOK_SERVICE_URL to cloud nine wallet backend

* feat(backend): fetch cardDetails during outgoing payment funded and cancelled

* chore(pos): correctly handle response from card service

* test(pos): update card service client test

* chore(card-service): add paymentRoutes to AppServices

* chore(backend): fix withGraphFetched query

* test(pos): remove unused test

* fix(card-service): update payment result type

* chore(card-service): format

---------

Co-authored-by: Max Kurapov <[email protected]>

* chore: add card-service and pos-service image build steps in CI (#3657)

* Added card-service and point-of-sale images when pushing to registry

* Added dockerfile.prod for card-service

* Added spectral to validate card-service open api specs

* Fix on building the packages

* Fixed dockerfile

* Added token-introspection

* trying to fix crypto issue

* Another try to fix card-service pipeline

* Still trying

* Testing if crypto is actually the issue here

* Trying to debug

* Added @types/node so it can see the crypto package

* Updated yaml for card-service, removed unnecessary changes

* Fix format

* Updated axios version of pos

* Added tags to card-service.yaml

* Removed token-introspection from pos and card services

* Added command to run pos and card services in docker file

* chore(point-of-sale): update pos service response structure (#3675)

* chore(point-of-sale): update pos service response structure

* fix: map cleanup in finally block

* feat: add integration test for pos-card flow (#3678)

* added integration test for pos flow

* updated pnpm lock

* Added webhook urls and signature secrets to c9 and hlf env

* Set up hosts for card service and pos for IT

* Added test env to performance test job

* Updated IT structure and test name, removed unnecessary formatting

* Forgot to remove 'card_expired' from result

* Updated result model after merging pos-cards branch

* Used prod docker files for pos and card services, added open api files to card-service build, fixed axios dependency issue

* feat: added sender wallet address to incoming payment (#3705)

* Added sender wallet address to incoming payment

* chore(card,pos-service): update alpine image

* chore(card-service, pos-service): cleanup unused code (#3718)

* chore(point-of-sale): remove merchant service, knex, db connections

* chore(card-service): remove knex, objection, db connection

* chore(localenv): remove db connections for pos and card service

* chore(pos): remove migration folder from dockerfile

* chore(bruno): remove unused POS service APIs

* chore(testenv): remove db connection for card and pos services

* chore(pos, card-service): use core imports from apollo client

* chore(point-of-sale, card-service): update webhook handling (#3725)

* chore(card-service): rename `/payment-event` route to `/webhook`

* chore(point-of-sale): make webhook signature signing optional

* chore(testenv): update CARD_WEBHOOK_SERVICE_URL

* test(point-of-sale): allow optional webhook signature

* feat(point-of-sale): pos service API for getting incoming payments (#3708)

* feat(point-of-sale): API for getting pos service's incoming payments

* fix: tests

* feat: filter out unnecessary fields in response

* chore: bruno collection urls

* feat: include senderWalletAddress in query

* fix: bruno urls

* fix: serialize query params properly for gql requests

* fix: expose tenant id in payment gql requests

* feat: use open payments-esque response format

* feat: include metadata

* feat: remove unnecessary fields

* fix: regenerate gql

* fix: imports

* fix: proper object assign use and pr comments

* feat(backend): add filtering incoming payments by initiatedBy (#3714)

* add filtering incoming payments by initiatedBy

* Added filter to walletAddress.incomingPayments resolver

* added filtering by initiatedBy to also work with notIn

* Added filter to getPage functions

* feat(point-of-sale): filter incoming payments by those initiated by card payemnt (#3734)

* chore(card-service): remove unused components (#3736)

* chore(card-service): remove pos-store

* chore(backend): remove redis from instantiation

* chore: remove unused pos & card service components (#3737)

* chore(testenv): remove port

* chore(localenv): removed card & pos volumes, ports, seed

* chore(card-service): remove init script

* chore(backend): remove unused card service

* chore(backend): remove card expiry from outgoing payment errors

* feat(point-of-sale): add `senderWalletAddress` to incoming payment creation (#3738)

* feat(point-of-sale): add USE_HTTP flag

* feat(point-of-sale): pass in senderWalletAddress into incoming payment creation

* chore(testenv): add USE_HTTP to point-of-sale service

* chore(point-of-sale): update card service client log service name

* test(point-of-sale): update payment route & service tests

---------

Co-authored-by: oana-lolea <[email protected]>
Co-authored-by: Nathan Lie <[email protected]>
Co-authored-by: Arpi Lengyel <[email protected]>
Co-authored-by: Arpi Lengyel <[email protected]>
Co-authored-by: xplicit <[email protected]>
Co-authored-by: zeppelin44 <[email protected]>
Co-authored-by: Antoniu Neacsu <[email protected]>
Co-authored-by: MiguelLescasJorgeSebastian <[email protected]>
Co-authored-by: HRadry <[email protected]>
Co-authored-by: Raul <[email protected]>
Co-authored-by: Raul Ranete <[email protected]>
Co-authored-by: dragosp1011 <[email protected]>
Co-authored-by: Bogdan S <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: ci Changes to the CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants