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

refactor(payment_link): add Miscellaneous charges in cart #3645

Merged
merged 4 commits into from
Feb 28, 2024

Conversation

sahkal
Copy link
Contributor

@sahkal sahkal commented Feb 13, 2024

Type of Change

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

Description

added Miscellaneous charges in cart

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?

Do Payment Create using the below curl, and look for Miscellaneous charges which must include the (amount - sum of all the order_details product charges).

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_ShWRM578WKdafb8q56e7i4pZ44dyXzaidU9EIpIGaBMSjHR1aDM1MQFEllYs1eIs' \
--data '{
    "amount": 710,
    "currency": "USD",
    
    "customer_id": "sahkal",
    "return_url": "https://google.com",
    
    "description": "For selling Tea",
    "capture_method": "automatic",
    "authentication_type": "no_three_ds",
    "order_details": [
        {
            "product_name": "Tea",
            "quantity": 1,
            "amount": 110,
            "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg"
        },
        {
            "product_name": "Tea",
            "quantity": 1,
            "amount": 110,
            "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg"
        },
        {
            "product_name": "Tea",
            "quantity": 1,
            "amount": 110,
            "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg"
        }
    ],
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "sahkal",
            "last_name":"poddar"
        }
    },
    "payment_link": true
}'
Screenshot 2024-02-14 at 12 27 10 AM

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 S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Feb 13, 2024
@sahkal sahkal added this to the February 2024 Release milestone Feb 13, 2024
@sahkal sahkal self-assigned this Feb 13, 2024
@sahkal sahkal requested a review from a team as a code owner February 13, 2024 18:54
kashif-m
kashif-m previously approved these changes Feb 28, 2024
@sahkal sahkal changed the title refactor(payment_link): added Miscellaneous charges in cart refactor(payment_link): add Miscellaneous charges in cart Feb 28, 2024
@preetamrevankar preetamrevankar added this pull request to the merge queue Feb 28, 2024
Merged via the queue into main with commit 15b367e Feb 28, 2024
13 of 15 checks passed
@preetamrevankar preetamrevankar deleted the add-miscellaneous-expenses-payment-link-ui branch February 28, 2024 09:29
pixincreate added a commit that referenced this pull request Feb 29, 2024
…stman-runner

* 'main' of github.com:juspay/hyperswitch:
  chore(version): 2024.02.29.0
  chore(postman): update Postman collection files
  feat(analytics): add force retrieve call for force retrieve calls (#3565)
  refactor(connector): [Mollie] Mask PII data  (#3856)
  refactor(connector): [Gocardless] Mask PII data (#3844)
  feat(analytics): adding metric api for dispute analytics (#3810)
  feat(payment_methods): Add default payment method column in customers table and last used column in payment_methods table (#3790)
  fix(tests/postman/adyen): enable sepa payment method type for payout flows (#3861)
  feat(payouts): Implement Smart Retries for Payout (#3580)
  refactor(payment_link): add Miscellaneous charges in cart (#3645)
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants