Repository navigation
BTePOS: sanitise customer and address data in the orderBundle - #133
Closed
rmcotton-sap wants to merge 2 commits into
Closed
rmcotton-sap wants to merge 2 commits into
rmcotton-sap wants to merge 2 commits into
Conversation
The loyalty leg of a split payment fetched the account group with a GET on
/opf/merchant/transactions?expand=accountGroup and passed it on through a custom field.
The verify context now exposes the Payment Integration ID smart field, which is the account
group. Map accountGroupId to ${input.paymentIntegrationId} and drop the lookup call and the
loyAccountGroupId custom field. The verify block goes from four calls to three.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
BTePOS rejected a payment, or answered with an HTML page instead of JSON, for ordinary address data. Measured against the sandbox through OPF initiate: - a double quote, a backslash or a line break in an address broke the hand-built JSON - a city or street over 50 characters, and a phone with +, spaces or brackets, were rejected - an & or % in any value returned an HTML error page, because the value is not encoded The orderBundle expression now replaces the characters that break the JSON, transliterates the Romanian diacritics as the iPay documentation asks, truncates to the documented lengths and continues a long street in postAddress2, keeps only digits in the phone, and percent-encodes every value. It uses no <#function>, which the OPF template engine does not render, and stays within the 2048-character limit of a mapping expression. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Customer and address values in the
orderBundleare cleaned before they are sent to BTePOS:",\and control characters?json_string; line breaks become a spacecity,postAddresspostAddress2postalCodephonefunctions.encodeURLRomanian diacritics are sent unchanged.
Changes
postman/btepos/PAYMENT_PAGE/BTePOS_mapping_configuration.jsonTesting
Tested against the BTePOS sandbox with 43 address variants (special characters, long values, phone formats, diacritics). All were accepted by BTePOS.
🤖 Generated with Claude Code