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

[Order Refactor][Step 1] Get all payment methods from Payment Service #1171

Open
nashtech-huyphamphu opened this issue Oct 14, 2024 · 1 comment
Assignees

Comments

@nashtech-huyphamphu
Copy link
Contributor

No description provided.

@nashtech-huyphamphu nashtech-huyphamphu changed the title Get list Payment methods [Order Refactor][Step 1]Get list Payment methods Oct 18, 2024
@nashtech-longlevanquoc1 nashtech-longlevanquoc1 removed their assignment Oct 18, 2024
@duylv27 duylv27 self-assigned this Nov 13, 2024
@duylv27 duylv27 changed the title [Order Refactor][Step 1]Get list Payment methods [Order Refactor][Step 1] Get all payment methods from Payment Service Nov 13, 2024
@duylv27 duylv27 moved this to 🏗 In progress in Yas's backlog Nov 13, 2024
@duylv27
Copy link
Contributor

duylv27 commented Nov 13, 2024

As is:

We are using the API below to retrieve payment providers.

  • Exposing unnecessary information in additionalSettings to the client, this information will only be used when processing payments.
  • Support field to store icon. For better UI/UX, each payment provider should have their own icon.

GET: /payment/storefront/payment-providers

[
    {
        "id": "PAYPAL",
        "name": "paypal",
        "configureUrl": "paypal-config",
        "additionalSettings": "{\"clientId\": \"clientId}\", \"clientSecret\": \"secrect\", \"mode\": \"sandbox\"}"
    },
    {
        "id": "COD",
        "name": "Cash on Delivery",
        "configureUrl": "cod-config",
        "additionalSettings": ""
    }
]

To be:

  • Remove additionalSettings from the response.
  • Add field iconUrl to store payment provider icon path.

GET: /payment/storefront/payment-providers

[
    {
        "id": "PAYPAL",
        "name": "paypal",
        "configureUrl": "paypal-config",
        "version": 0,
        "mediaId": 82,
        "iconUrl": "http://localhost:8083/medias/82/file/paypal.png"
    },
    {
        "id": "COD",
        "name": "Cash on Delivery",
        "configureUrl": "cod-config",
        "version": 0,
        "mediaId": 81,
        "iconUrl": "http://localhost:8083/medias/81/file/cod.png"
    }
]

Now, payment provider data are created by liquibase, and it cannot be edit. We can enhance following things later:

  • Create payment provider admin page: which allow admin to manage payment provider on UI (CRUD, validate for each providers, upload icons, etc).
    ...

@duylv27 duylv27 moved this from 🏗 In progress to 👀 In review in Yas's backlog Nov 18, 2024
minhtridn2001 pushed a commit that referenced this issue Dec 13, 2024
* - Get payment providers
* - Update payment API & config
* - Fix checkstyle, add UT
---------

Co-authored-by: Duy Le Van <[email protected]>
Co-authored-by: Tri Phung Quang Minh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 👀 In review
Development

No branches or pull requests

3 participants