Lemonway API does not accept most special chars anymore in holder field when registering an IBAN. This PR replaces all chars other than letters, digits, spaces and dashes (-) by spaces.
lib/factories/wallet-factory.js: replace unauthorized chars by spaces in holder field.
test/wallet/register-iban.js: rewrite test with async/await + add new test
Coming-up next
[x] Upcoming PR on api.october.eu to bump lemonway package. See this PR.
Real-case testing
Clone lemonway repo, checkout this branch, launch npm install
In api.october.eu :
change package.json to link to local lemonway package: "lemonway": "file:./path/to/lemonway",
launch npm install to take this change into account
since there's no Lemonway VPN anymore, use this in your .env file: ENABLE_LEMONWAY_PROXY=0
Connect to October gateway on VPN to be able to connect lemonway sandbox API
Launch the local app and api:
Create a project in the app associated to a business whose name contains a special char like #. In project tab, click "new project". You can use a json file to easily create the project.
In "Submit" tab, click "Save" at the top and then "Validate" at the bottom of the page. Without the fix in this PR, this should return a bad input data error from Lemonway. This error is corrected by this fix.
Check in lemonway sandbox that the Iban was added with titulaire field having special chars are replaced by spaces.
Summary
Lemonway API does not accept most special chars anymore in
holder
field when registering an IBAN. This PR replaces all chars other than letters, digits, spaces and dashes (-
) by spaces.Closes POF-407
Changes
lib/factories/wallet-factory.js
: replace unauthorized chars by spaces inholder
field.test/wallet/register-iban.js
: rewrite test with async/await + add new testComing-up next
api.october.eu
to bump lemonway package. See this PR.Real-case testing
npm install
package.json
to link to local lemonway package:"lemonway": "file:./path/to/lemonway",
npm install
to take this change into account.env
file:ENABLE_LEMONWAY_PROXY=0
#
. In project tab, click "new project". You can use a json file to easily create the project.bad input data
error from Lemonway. This error is corrected by this fix.titulaire
field having special chars are replaced by spaces.