Skip to content

Conversation

koekiebox
Copy link
Collaborator

Please go to the Preview tab and select the appropriate sub-template:

oana-lolea and others added 30 commits August 18, 2025 15:21
* Created the backbone for the card service

* Format fix

* feat: add card service to docker compose

---------

Co-authored-by: Nathan Lie <lie4nathan@gmail.com>
* 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 <lie4nathan@gmail.com>
* migration & model for card payments
* merchants table migrations and model
* fix(cards-service): add dependencies to package.json

* chore(cards-service): lockfile
* merchants table migrations and model
…3533)

* feat(card-service): add testcontainers setup

* chore(cards-service): lockfile

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

* fix(cards-service): fix type issue
* merchant service

* jest setup

* tests
…ceHost) 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 <kantoniu98@gmail.com>
* post merchants route

---------

Co-authored-by: Nathan Lie <lie4nathan@gmail.com>
* 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
* pos device service

* Added algorithm as param on registering device, updated tests so that we check the device obj
…e 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 <adriana@lacamara.dev>
* 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(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(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 <raul.ranete@breakpoinit.eu>
…rom 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
…ment 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
* 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
oana-lolea and others added 19 commits August 18, 2025 15:22
* Payment route structure

* Added routes test file

* Removed some comments

* Added test for unknown error

* Updated graphql generated files
* 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 <lie4nathan@gmail.com>

* 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 <kantoniu98@gmail.com>

* 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 <oana.lolea@breakpointit.eu>
Co-authored-by: zeppelin44 <antoniu@interledger.foundation>
Co-authored-by: Antoniu Neacsu <kantoniu98@gmail.com>
…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 <lie4nathan@gmail.com>

* 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 <lie4nathan@gmail.com>

* 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 <kantoniu98@gmail.com>

* 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 <oana.lolea@breakpointit.eu>
Co-authored-by: zeppelin44 <antoniu@interledger.foundation>
Co-authored-by: Antoniu Neacsu <kantoniu98@gmail.com>
…te (#3614)

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

* chore: regenerate graphql

* chore: regenerate gql
… 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
…on 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

* fix(backend): remove fallback webhook URL for POS
…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
* Matched bodies between pos and card services /payment

* Forgot to stage this

* Fixed test

* Updated graphql types
…load (#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): 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 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
* 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 <max@interledger.org>
* 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
Copy link

netlify bot commented Oct 1, 2025

Deploy Preview for brilliant-pasca-3e80ec canceled.

Name Link
🔨 Latest commit e73a86e
🔍 Latest deploy log https://app.netlify.com/projects/brilliant-pasca-3e80ec/deploys/68e39d0451195d0008a65fc5

@github-actions github-actions bot added type: ci Changes to the CI type: tests Testing related pkg: backend Changes in the backend package. pkg: frontend Changes in the frontend package. type: source Changes business logic pkg: mock-ase pkg: mock-account-service-lib labels Oct 1, 2025
Copy link

github-actions bot commented Oct 1, 2025

🚀 Performance Test Results

Test Configuration:

  • VUs: 4
  • Duration: 1m0s

Test Metrics:

  • Requests/s: 43.89
  • Iterations/s: 14.65
  • Failed Requests: 0.00% (0 of 2640)
📜 Logs

> performance@1.0.0 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..................: 953 kB 16 kB/s
     data_sent......................: 2.0 MB 34 kB/s
     http_req_blocked...............: avg=7.35µs   min=2.31µs   med=4.99µs   max=1.67ms   p(90)=6.26µs   p(95)=6.69µs  
     http_req_connecting............: avg=704ns    min=0s       med=0s       max=842.26µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=90.48ms  min=6.94ms   med=75.47ms  max=507.89ms p(90)=155.36ms p(95)=180.92ms
       { expected_response:true }...: avg=90.48ms  min=6.94ms   med=75.47ms  max=507.89ms p(90)=155.36ms p(95)=180.92ms
     http_req_failed................: 0.00%  ✓ 0         ✗ 2640
     http_req_receiving.............: avg=83.75µs  min=24.92µs  med=73.98µs  max=1.25ms   p(90)=109.43µs p(95)=136.68µs
     http_req_sending...............: avg=37.22µs  min=9.21µs   med=26.66µs  max=2.97ms   p(90)=38.48µs  p(95)=54.33µs 
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=90.36ms  min=6.83ms   med=75.38ms  max=507.79ms p(90)=155.18ms p(95)=180.81ms
     http_reqs......................: 2640   43.894786/s
     iteration_duration.............: avg=272.77ms min=175.14ms med=256.65ms max=1.04s    p(90)=343.62ms p(95)=379.67ms
     iterations.....................: 881    14.648222/s
     vus............................: 4      min=4       max=4 
     vus_max........................: 4      min=4       max=4 

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

* fix: map cleanup in finally block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: backend Changes in the backend package. pkg: frontend Changes in the frontend package. pkg: mock-account-service-lib pkg: mock-ase type: ci Changes to the CI type: source Changes business logic type: tests Testing related
Projects
None yet
Development

Successfully merging this pull request may close these issues.