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): Better UI payment link and order details product image and merchant config support #2583

Merged
merged 89 commits into from
Oct 17, 2023

Conversation

sahkal
Copy link
Contributor

@sahkal sahkal commented Oct 13, 2023

Type of Change

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

Description

Added better UI with animation in payment link along with orderDetails to support product_img_link param.
It also adds, new params in merchant Account to configure payment link styles

Additional Changes

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

"order_details":[{ "product_name":"Tea", "quantity":1, "amount":10, "product_img_link":"https://static-00.iconduck.com/assets.00/clock-small-icon-2048x2048-srddipq8.png" }

`pub struct OrderDetailsWithAmount {
/// Name of the product that is being purchased
#[schema(max_length = 255, example = "shirt")]
pub product_name: String,
/// The quantity of the product to be purchased
#[schema(example = 1)]
pub quantity: u16,
/// the amount per quantity of product
pub amount: i64,
/// The image URL of the product
pub product_img_link: Option<String>,
}`

"payment_link_metadata": { "merchant_logo": "https://i.pinimg.com/736x/4d/83/5c/4d835ca8aafbbb15f84d07d926fda473.jpg", "color_scheme":{ "primary_color": "#34ebeb", "primary_accent_color": null, "secondary_color": null } }

pub struct PaymentLinkMetadata { pub merchant_logo: Option<String>, pub color_scheme: Option<PaymentLinkColorSchema>, }

pub struct PaymentLinkColorSchema { pub primary_color: Option<String>, pub primary_accent_color: Option<String>, pub secondary_color: Option<String>, }

Motivation and Context

How did you test it?

Screenshot 2023-10-13 at 10 10 21 PM

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 added 30 commits August 17, 2023 15:41
@sahkal sahkal added M-database-changes Metadata: This PR involves database schema changes M-api-contract-changes Metadata: This PR involves API contract changes labels Oct 13, 2023
@sahkal sahkal changed the title feat(router): Better UI payment link and order details product image support feat(router): Better UI payment link and order details product image and merchant config support Oct 13, 2023
crates/api_models/src/admin.rs Outdated Show resolved Hide resolved
crates/router/src/core/payment_link.rs Outdated Show resolved Hide resolved
crates/router/src/core/payment_link.rs Outdated Show resolved Hide resolved
@sahkal sahkal requested a review from Narayanbhat166 October 16, 2023 10:22
@sahkal sahkal requested a review from Narayanbhat166 October 17, 2023 06:43
@bernard-eugine bernard-eugine added this pull request to the merge queue Oct 17, 2023
Merged via the queue into main with commit fdd9580 Oct 17, 2023
10 checks passed
@bernard-eugine bernard-eugine deleted the better_ui_payment_link branch October 17, 2023 09:18
@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 Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: Feature request or enhancement M-api-contract-changes Metadata: This PR involves API contract changes M-database-changes Metadata: This PR involves database schema changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants