Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(router): add list payment link support #2805

Merged
merged 51 commits into from
Nov 22, 2023

Conversation

sahkal
Copy link
Contributor

@sahkal sahkal commented Nov 8, 2023

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Add List payment link support based on merchant_id

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Screenshot 2023-11-08 at 1 55 14 PM

Test case

curl --location 'http://localhost:8080/payment_link/list?limit=2' \
--header 'api-key: dev_xVgcVhcjChHQjUNu0dV9FEzVd7nkOn0YbBfyGW202qlAoYY8vplqBlsA3ivZbYay' 

response


[
    {
        "payment_link_id": "plink_genDC3Pj15o4AUbjBRtD",
        "merchant_id": "merchant_1700034333",
        "link_to_pay": "http://localhost:8080/payment_link/merchant_1700034333/pay_nVYe8IrGcCouQx9o8mRY",
        "amount": 3423,
        "created_at": "2023-11-17T12:05:22.937Z",
        "link_expiry": "2025-10-09T16:23:10.000Z",
        "description": "For selling Tea",
        "status": "active",
        "currency": "USD"
    },
    {
        "payment_link_id": "plink_7B1oGz1MSCBvJathfNDI",
        "merchant_id": "merchant_1700034333",
        "link_to_pay": "http://localhost:8080/payment_link/merchant_1700034333/pay_36QjBcER7pzkUkSNcMLK",
        "amount": 3423,
        "created_at": "2023-11-16T09:30:50.387Z",
        "link_expiry": "2025-10-09T16:23:10.000Z",
        "description": null,
        "status": "active",
        "currency": "USD"
    }
]

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

@sahkal sahkal added A-core Area: Core flows C-feature Category: Feature request or enhancement S-waiting-on-review Status: This PR has been implemented and needs to be reviewed R-waiting-on-L1 Review: Waiting on L1 reviewer labels Nov 8, 2023
@sahkal sahkal added this to the November 2023 Release milestone Nov 8, 2023
@sahkal sahkal self-assigned this Nov 8, 2023
@sahkal sahkal requested review from a team as code owners November 8, 2023 03:08
@Narayanbhat166
Copy link
Member

All the checks are failing, seems like there are some commits in this PR which are unrelated

crates/router/src/routes/app.rs Outdated Show resolved Hide resolved
crates/router/src/routes/app.rs Show resolved Hide resolved
crates/api_models/src/payments.rs Outdated Show resolved Hide resolved
crates/api_models/src/payments.rs Outdated Show resolved Hide resolved
crates/api_models/src/payments.rs Outdated Show resolved Hide resolved
crates/api_models/src/payments.rs Outdated Show resolved Hide resolved
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Nov 22, 2023
Merged via the queue into main with commit b441a1f Nov 22, 2023
10 of 12 checks passed
@Gnanasundari24 Gnanasundari24 deleted the list-payment-link-support branch November 22, 2023 10:25
@SanchithHegde SanchithHegde removed S-waiting-on-review Status: This PR has been implemented and needs to be reviewed R-waiting-on-L1 Review: Waiting on L1 reviewer labels Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows C-feature Category: Feature request or enhancement M-database-changes Metadata: This PR involves database schema changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants