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 <[email protected]>
* 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]>
* 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 <[email protected]>
* post merchants route

---------

Co-authored-by: Nathan Lie <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
…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
njlie and others added 15 commits August 27, 2025 10:07
…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 <[email protected]>
* 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
@netlify
Copy link

netlify bot commented Oct 1, 2025

Deploy Preview for brilliant-pasca-3e80ec ready!

Name Link
🔨 Latest commit c9b56e7
🔍 Latest deploy log https://app.netlify.com/projects/brilliant-pasca-3e80ec/deploys/68f900a55cde720007ca4814
😎 Deploy Preview https://deploy-preview-3677--brilliant-pasca-3e80ec.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@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
@github-actions
Copy link

github-actions bot commented Oct 1, 2025

🚀 Performance Test Results

Test Configuration:

  • VUs: 4
  • Duration: 1m0s

Test Metrics:

  • Requests/s: 38.31
  • Iterations/s: 12.79
  • Failed Requests: 0.00% (0 of 2304)
📜 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..................: 832 kB 14 kB/s
     data_sent......................: 1.8 MB 29 kB/s
     http_req_blocked...............: avg=8.3µs    min=2.51µs  med=5.75µs   max=879.32µs p(90)=6.99µs   p(95)=7.59µs  
     http_req_connecting............: avg=390ns    min=0s      med=0s       max=262.32µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=103.71ms min=8.38ms  med=84.51ms  max=570.43ms p(90)=181.53ms p(95)=201.35ms
       { expected_response:true }...: avg=103.71ms min=8.38ms  med=84.51ms  max=570.43ms p(90)=181.53ms p(95)=201.35ms
     http_req_failed................: 0.00%  ✓ 0         ✗ 2304
     http_req_receiving.............: avg=97.19µs  min=27.93µs med=84.97µs  max=2.75ms   p(90)=126.95µs p(95)=158.91µs
     http_req_sending...............: avg=38.65µs  min=10.6µs  med=29.6µs   max=4.57ms   p(90)=42.27µs  p(95)=54.7µs  
     http_req_tls_handshaking.......: avg=0s       min=0s      med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=103.58ms min=8.21ms  med=84.41ms  max=570.34ms p(90)=181.39ms p(95)=200.84ms
     http_reqs......................: 2304   38.311088/s
     iteration_duration.............: avg=312.49ms min=178.9ms med=296.98ms max=1.13s    p(90)=386.98ms p(95)=422.3ms 
     iterations.....................: 769    12.786991/s
     vus............................: 4      min=4       max=4 
     vus_max........................: 4      min=4       max=4 

sanducb and others added 4 commits October 6, 2025 13:42
* chore(point-of-sale): update pos service response structure

* fix: map cleanup in finally block
* 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
* Added sender wallet address to incoming payment
# Conflicts:
#	.github/workflows/node-build.yml
#	localenv/happy-life-bank/docker-compose.yml
#	pnpm-lock.yaml
#	test/testenv/cloud-nine-wallet/docker-compose.yml
#	test/testenv/happy-life-bank/docker-compose.yml
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.