Skip to content
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

refactor: access to the Payone language object #1755

Merged
merged 2 commits into from
Feb 18, 2025

Conversation

rowiish
Copy link
Contributor

@rowiish rowiish commented Feb 17, 2025

PR Type

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[x] Refactoring (no functional changes, no API changes)
[ ] Build-related changes
[ ] CI-related changes
[ ] Documentation content changes
[ ] Application / infrastructure changes
[ ] Other:

What Is the Current Behavior?

The current implementation uses an eval() expression to resolve the Payone Client API object for localization. That's unsafe.

What Is the New Behavior?

The Payone connector will be updated to provide a simplified access to this object in the Payone API using an attributed named languageCode. The fallback uses the old response attribute language and extracts the locale code from it without using eval() anymore. There are no visual changes.

  • prepare use of adapted API for hosted payment page configuration of Payone Hosted Payment Page (Client API)
  • refactored fallback code in order to avoid usage of eval() to resolve Payone language object

Does this PR Introduce a Breaking Change?

[ ] Yes
[x] No

Other Information

AB#104064

…e of adapted API for hosted payment page configuration
@rowiish rowiish self-assigned this Feb 17, 2025
@rowiish rowiish requested a review from SGrueber February 17, 2025 15:02
@SGrueber SGrueber changed the title feat: avoid use of eval to resolve Payone language object, prepare us… refactor: resolve of the Payone language object Feb 17, 2025
@SGrueber SGrueber added the refactoring Refactoring of current code label Feb 17, 2025
@SGrueber SGrueber added this to the 5.3 milestone Feb 17, 2025
SGrueber
SGrueber previously approved these changes Feb 17, 2025
@SGrueber SGrueber changed the title refactor: resolve of the Payone language object refactor: access to the Payone language object Feb 17, 2025
@SGrueber SGrueber merged commit 058e1d0 into develop Feb 18, 2025
22 checks passed
@SGrueber SGrueber deleted the feature/avoid-eval-expression branch February 18, 2025 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Refactoring of current code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants