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

chore: add customer, shipping and billing details to payment_response for payment list api #5406

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

prajjwalkumar17
Copy link
Contributor

@prajjwalkumar17 prajjwalkumar17 commented Jul 22, 2024

Type of Change

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

Description

This pr adds the decrypted customer_details, shipping and billling address in Payment list response.
#5401

Additional Changes

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

Motivation and Context

Required for our Dashboard

How did you test it?

We need to make a payment with shipping, billing and customer details and then hit the Payment list api:

curl --location --request GET 'http://127.0.0.1:8080/payments/list' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'api-key:xxxxxxx' \
--data '{
}'

The response should contain the below fields:

   "customer_id": "uiuiuiui",
    "customer": {
        "id": "uiuiuiui",
        "name": null,
        "email": "[email protected]",
        "phone": null,
        "phone_country_code": null
    },
 "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "NL",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": "[email protected]"
    },

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

… for payment list api (#5401)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
@prajjwalkumar17 prajjwalkumar17 added A-core Area: Core flows C-refactor Category: Refactor labels Jul 22, 2024
@prajjwalkumar17 prajjwalkumar17 added this to the July 2024 Release milestone Jul 22, 2024
@prajjwalkumar17 prajjwalkumar17 self-assigned this Jul 22, 2024
@prajjwalkumar17 prajjwalkumar17 requested review from a team as code owners July 22, 2024 16:25
@likhinbopanna likhinbopanna merged commit e436967 into hotfix-2024.07.19.0 Jul 22, 2024
22 of 24 checks passed
@likhinbopanna likhinbopanna deleted the refactor/payment_list branch July 22, 2024 17:58
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-refactor Category: Refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor: Add customer_details, billing and shipping address in Payment LIst
5 participants