Remove encryption certificate fingerprint blank validation for custom credit card #6032
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
Checklist