[Backport to release/10.3] Retrieving two-letter country code from the three-letter code with league/iso3166 + additional fixes #61741
+2,990
−6
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.
This PR is a cherry-pick of #61678 to
release/10.3.Original PR Description
Submission Review Guidelines:
Changes proposed in this Pull Request:
Towards PAYPAL-106
In this PR, I am using the league/iso3166 composer package to retrieve the two-letter country code from a three-letter code before attempting to create a PayPal Standard order. This should address some possible issues when the two-letter code would not match the three-letter version, just by truncating the string value (e.g., Uruguay (URY, UY).
Additional fixes:
How to test the changes in this Pull Request:
Code review. If you want to test this flow, you can follow #61034 to see if no regression was introduced.
Testing that has already taken place:
Changelog entry
Changelog Entry Details
Significance
Type
Message
Attempts to identify the PayPal two-letter country code from a three-letter code using the
league/iso3166composer package, and applies minor additional fixesChangelog Entry Comment
Comment