-
Notifications
You must be signed in to change notification settings - Fork 11
Register the integration webhook in Sequra #104
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
base: master
Are you sure you want to change the base?
Conversation
ISSUE: LIS-90
ISSUE: LIS-90
ISSUE: LIS-90
ISSUE: LIS-90
ISSUE: LIS-90
ISSUE: LIS-90
ISSUE: LIS-90
ISSUE: LIS-90
ISSUE: LIS-90
# Conflicts: # composer.json # package-lock.json
ISSUE: LIS-90
ISSUE: LIS-90
ISSUE: LIS-90
ISSUE: LIS-90
|
We have noticed that an “Advanced” section has been added in the latest CORE UI version. Should these changes be included in the current onboarding implementation for the Magento 2 integration? They would require implementing a new endpoint and backend business logic. If this is something that should be included at this point, then the exact requirements for what the endpoint should return need to be clearly defined. |
|
We also observed that |
|
Please provide us with the translations for the button on the Connection Settings page, which allows merchants to re-register their store integration for the corresponding deployment target: Button label:
Success message:
Error message:
|
Thanks @tamaralogeecom for pointing this out. I've submitted a solution via this PR. Please have a look at it |
This new section is not part of the Onboarding flow. It is accesible once the onboarding is completed. I would implement it in a new PR due you will need to do several changes to support it. There's a working implementation in the woocommerce repository you can use as a guide. |
Button label:
Success message:
Error message:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request implements webhook registration functionality in Sequra for a Magento 2 integration. The changes include adding a webhook re-registration button on the Connection Settings page, implementing a RegexProvider for validation, updating the CORE and CORE UI library versions, and adding an Advanced section with debug logging capabilities.
Key Changes:
- Added webhook re-registration functionality with UI button and backend endpoint
- Implemented regex validation system with ValidationService updates
- Added Advanced/Debug section for log management
- Updated CORE UI library to enable new features
- Fixed URL parameter encoding (changed from
encodeURIComponentwrapping to inline usage) - Added comprehensive translation updates for 5 languages (EN, ES, FR, IT, PT)
Reviewed changes
Copilot reviewed 36 out of 41 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| StateController.js (override) | Adds Advanced state/pages, fixes URL encoding, adds data store clearing |
| SettingsController.js (override) | Updates to use new encoding pattern and adds SequraFE.customHeader |
| PaymentController.js (override) | Adds support link, updates encoding, handles payment method icons |
| ConnectionSettingsForm.js | Implements webhook re-registration button and handler |
| AdvancedController.js | New controller for debug logs management page |
| ValidationService.js | Adds regex provider requirement check and new validation methods |
| UtilityService.js | Adds getMenuItems helper for navigation |
| ResponseService.js | Adds successHandler for success messages |
| ElementGenerator.js | Adds createActionsBar and createSupportLink helpers |
| GeneralSettingsForm.js | Adds service-related fields and validation |
| Translation files | Comprehensive updates for webhook, debug, and service features |
| sequra-core.css | Major styling updates with proper scoping and new components |
| index.phtml | Adds regex configuration and ValidationService loading |
| sequra_configuration_index.xml | Updates script loading order |
| package.json | Updates CORE UI version to feature branch |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| elem.style.display = 'none' | ||
| elem.innerHTML = ''; | ||
| }); | ||
| document.querySelectorAll('.sqm--log-details').forEach(elem => { | ||
| elem.classList.remove('sqm--log-details-open'); | ||
| }); | ||
| } |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid automated semicolon insertion (92% of all statements in the enclosing function have an explicit semicolon).
| elem.style.display = 'none' | |
| elem.innerHTML = ''; | |
| }); | |
| document.querySelectorAll('.sqm--log-details').forEach(elem => { | |
| elem.classList.remove('sqm--log-details-open'); | |
| }); | |
| } | |
| elem.style.display = 'none'; | |
| elem.innerHTML = ''; | |
| }); | |
| document.querySelectorAll('.sqm--log-details').forEach(elem => { | |
| elem.classList.remove('sqm--log-details-open'); | |
| }); | |
| }; |
| } | ||
| } | ||
| return countriesString ? translate('countries.enabledCountries').replace('{countries}', countriesString) : ''; | ||
| } |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid automated semicolon insertion (90% of all statements in the enclosing function have an explicit semicolon).
|
|
||
| return regexExp.test(str); | ||
| // Update the visibility of the fields. | ||
| const selector = '.sq-field-wrapper:has(.sq-service-related-field), .sq-field-wrapper.sq-service-related-field' |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid automated semicolon insertion (90% of all statements in the enclosing function have an explicit semicolon).
| ) | ||
| ] | ||
| ); | ||
| } |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid automated semicolon insertion (96% of all statements in the enclosing function have an explicit semicolon).
| } | |
| }; |
| switch (page) { | ||
| case SequraFE.appPages.ONBOARDING.COUNTRIES: | ||
| if (!dataStore.connectionSettings?.connectionData?.every(c => c.username)) { | ||
| page = SequraFE.appPages.ONBOARDING.CONNECT |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid automated semicolon insertion (96% of all statements in the enclosing function have an explicit semicolon).
ISSUE: LIS-90
ISSUE: LIS-90
What is the goal?
References
How is it being implemented?
How is it tested?