Skip to content

Remove encryption certificate fingerprint blank validation for custom credit card #6032

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

Merged
merged 1 commit into from
Jun 30, 2025

Conversation

manefz
Copy link
Contributor

@manefz manefz commented Jun 27, 2025

WHY are these changes introduced?

Similar to #6032
This was missed on the previous PR. Both should have the same validations for certificates.

Fixes the issue where the custom cc app extension creation systematically failed when using the templates due to the fact that :

The template includes a blank fingerprint field. Code reference
The CLI schema enforces that the fingerprint field contains a string of at LEAST 1 character. Code reference
Reason # 1 : This app extension creation failure is a bug/blocker for partners because the CLI systematically fails generating a credit card payment extension, and the developer cannot create a credit card extension.

Reason # 2 : There is already the same validation in core.

WHAT is this pull request doing?

Removes the string contents validation, the key must still be present, but it can be empty now.
encryption_certificate_fingerprint = ""

How to test your changes?

Pre-requisite : Have an app already setup with the local dev setup for dev dashboard, as documented here

The organization must have the credit_card_extensions organization beta flag enabled in business-platform

1- dev cd cli
2- checkout this branch : git checkout mza/rm-cc-cert-validation
3- Run the following command in your app :

SHOPIFY_CLI_NEVER_USE_PARTNERS_API=1 SHOPIFY_SERVICE_ENV=local pnpm shopify app generate extension --path="<path/to/your_app>"
4- Generate a custom credit card extension. This will use the template by default which contains an empty certificate.
Assert that it succeeds when running this from the cli directory (using the local CLI version) but fails when done elsewhere (deployed CLI version)

See the following demo that was done for regular credit card extensions

Post-release steps

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

@manefz manefz requested review from a team as code owners June 27, 2025 12:20
Copy link
Contributor

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
78.36% (+0.01% 🔼)
12572/16044
🟡 Branches
72.52% (+0.05% 🔼)
6123/8443
🟡 Functions 78.49% 3280/4179
🟡 Lines
78.8% (+0.01% 🔼)
11897/15098

Test suite run success

2916 tests passing in 1262 suites.

Report generated by 🧪jest coverage report action from c487f84

Copy link
Contributor

@bbraschi bbraschi left a comment

Choose a reason for hiding this comment

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

LGTM!

Same as #6008 but for custom credit card.

@manefz manefz changed the title Remove fingerprint blank validation for custom credit card on shopify… Remove fingerprint blank validation for custom credit card Jun 27, 2025
@manefz manefz changed the title Remove fingerprint blank validation for custom credit card Remove encryption certificate fingerprint blank validation for custom credit card Jun 27, 2025
Copy link

@delongGao delongGao left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@isaacroldan isaacroldan added this pull request to the merge queue Jun 30, 2025
Merged via the queue into main with commit eeaf670 Jun 30, 2025
30 checks passed
@isaacroldan isaacroldan deleted the mza/rm-custom-cc-cert-validation branch June 30, 2025 10:53
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.

4 participants