Skip to content

Conversation

@sf-mkosak
Copy link

The API's were changed in a way where any properties specific to a particular payment gateway will be embedded in a new API req/resp object called gatewayProperties.

PATCH /orders/{id}/payment-instruments/{id} response payload with Stripe for example

{
  paymentReference: {
    gatewayProperties: {
       stripe: {
           clientSecret: 'secret'
       }
    }
}

PayPal request payload

{
  paymentReferenceRequest: {
    gatewayProperties: {
       paypal: {
           shippingPreference: '...'
       }
    }
}

Description

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Breaking change (could cause existing functionality to not work as expected)
  • Other changes (non-breaking changes that does not fit any of the above)

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

Changes

  • (change1)

How to Test-Drive This PR

  • (step1)

Checklists

General

  • Changes are covered by test cases
  • CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance

You must check off all items in one of the follow two lists:

  • There are no changes to UI

or...

Localization

  • Changes include a UI text update in the Retail React App (which requires translation)

… and shippingPreference into gatewayProperties area of API req/resp
@cc-prodsec
Copy link
Collaborator

cc-prodsec commented Dec 17, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

const paymentIntent = {
client_secret: orderPaymentInstrument.paymentReference.clientSecret,
client_secret:
orderPaymentInstrument.paymentReference.gatewayProperties?.stripe?.clientSecret,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is obviously very stripe specific. I dont think the branch supports Adyen in any way yet but keep me honest

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually addressed this in my PR since it was blocking me testing the fail order if I didn't. I created a separate util function so that we can add gateway specific logic the instead

@sf-mkosak sf-mkosak marked this pull request as ready for review December 19, 2025 15:15
@sf-mkosak sf-mkosak requested a review from a team as a code owner December 19, 2025 15:15
return {
client_secret: updatedPaymentInstrument.paymentReference.clientSecret,
client_secret:
updatedPaymentInstrument.paymentReference.gatewayProperties?.stripe

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually addressed this in my PR since it was blocking me testing the fail order if I didn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants