Skip to content

Add new getPaymentInstrumentDetails helper#1130

Merged
gciotola merged 3 commits into
mainfrom
feat/604-get-payment-istrument-details
May 15, 2026
Merged

Add new getPaymentInstrumentDetails helper#1130
gciotola merged 3 commits into
mainfrom
feat/604-get-payment-istrument-details

Conversation

@gciotola
Copy link
Copy Markdown
Contributor

@gciotola gciotola commented May 14, 2026

Related to commercelayer/issues-app#604

What I did

I've extracted from ResourcePaymentMethod a new helper to easily retrieve payment instrument details

const { 
  paymentMethodName,    // Adyen Payment
  cardType,             // Visa
  issuerType,           // credit card
  cardLastDigits,       // 4242
  cardExpiry.           // 10/29
} = getPaymentInstrumentDetails(orderWithPaymentSourceResponse)

How to test

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests).
  • Make sure to add/update documentation regarding your changes.
  • You are NOT deprecating/removing a feature.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 14, 2026

Deploy Preview for commercelayer-app-elements ready!

Name Link
🔨 Latest commit c947323
🔍 Latest deploy log https://app.netlify.com/projects/commercelayer-app-elements/deploys/6a06ea074786890008de63aa
😎 Deploy Preview https://deploy-preview-1130--commercelayer-app-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@gciotola gciotola changed the title feat: expose getPaymentInstrumentDetails helper Add new getPaymentInstrumentDetails helper May 14, 2026
@gciotola gciotola self-assigned this May 14, 2026
@pfferrari pfferrari added the enhancement New feature or request label May 15, 2026
pfferrari
pfferrari previously approved these changes May 15, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 15, 2026

npm i https://pkg.pr.new/commercelayer/app-elements/@commercelayer/app-elements@1130

commit: c947323

@gciotola gciotola requested a review from pfferrari May 15, 2026 12:13
@gciotola gciotola merged commit bd7bfb6 into main May 15, 2026
7 checks passed
@gciotola gciotola deleted the feat/604-get-payment-istrument-details branch May 15, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants