[BUG] AchDetails.bankAccountNumber is not in state.data but it is not typed optional
aaronchlam opened this issue · comments
Describe the bug
AchDetails.bankAccountNumber
is not optional but it is not part of state.data
. I tested an ACH payment in the test environment according to the test section of the ACH payment method doc for Components and got the following state.data
back. Notice that is does not have the bankAccountNumber
field but it is not an optional key so the type does not match the test data.
{
"riskData": {
"clientData": "eyJ2ZXJzaW9uIjoiMS4wLjAiLCJkZXZpY2VGaW5nZXJwcmludCI6IkRwcXdVNHpFZE4wMDUwMDAwMDAwMDAwMDAwYnN4MDlDWDZ0RDAwNTM0OTQ3NzBjVkI5NGlLekJHR1FETXVwbFdWNEJpeDdSWDNhejgwMDJTeFhtVld5ektxMDAwMDBZVnhFcjAwMDAwMDhEWGo4MjJhRmlaQ3FuSTRsc2s6NDAiLCJwZXJzaXN0ZW50Q29va2llIjpbXSwiY29tcG9uZW50cyI6eyJ1c2VyQWdlbnQiOiJiNGIyYzkxYWIyZDVkNzc1ZWQ1MTBhM2I2MDcyOGVhMSIsIndlYmRyaXZlciI6MCwibGFuZ3VhZ2UiOiJlbi1VUyIsImNvbG9yRGVwdGgiOjMwLCJkZXZpY2VNZW1vcnkiOjgsInBpeGVsUmF0aW8iOjIsImhhcmR3YXJlQ29uY3VycmVuY3kiOjEyLCJzY3JlZW5XaWR0aCI6MTY4MCwic2NyZWVuSGVpZ2h0IjoxMDUwLCJhdmFpbGFibGVTY3JlZW5XaWR0aCI6MTY4MCwiYXZhaWxhYmxlU2NyZWVuSGVpZ2h0IjoxMDI1LCJ0aW1lem9uZU9mZnNldCI6MjQwLCJ0aW1lem9uZSI6IkFtZXJpY2EvVG9yb250byIsInNlc3Npb25TdG9yYWdlIjoxLCJsb2NhbFN0b3JhZ2UiOjEsImluZGV4ZWREYiI6MSwiYWRkQmVoYXZpb3IiOjAsIm9wZW5EYXRhYmFzZSI6MSwicGxhdGZvcm0iOiJNYWNJbnRlbCIsInBsdWdpbnMiOiIyOWNmNzFlM2Q4MWQ3NGQ0M2E1YjBlY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WIZXa614BaSmb2_1dpNEIVgCMhNbEO60CtPw73BHrICHEjTt8GRuaj8S3yFkGm6iqevFIGOackxpKoWiXqRIZESfSyq287lHXB69Uk3NY.zO83khbw3kjBey8DP5NSNAWIritoqPJX45P6E21LKbY",
"encryptedBankLocationId": "eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZDQkMtSFM1MTIiLCJ2ZXJzaW9uIjoiMSJ9.khRz_mSMYP87ig_uM1tZm93dJg8_7Rbp7ATFMMEWnYTX3UcpA-4iLGrfn3u2Q1xCAiFglowXTJ6gNZbxXqRjh1F6TCmpPQKgD-x419QcMAXVy1yUVgf8TBec3ZZMTxiP7BsBil5AFPZc7O0RQcN4QaZZ8TfTxtJHTDbbnyM27vGadrftoTlhIMtG0ly8SXJG2WfP13s3OJRrQmZT8SBYgk7Np3-ofGhdT9aDFVyVQvjTpnG3YT-HC_5aPbmqgizYObkEyRfpTSAVmoUyLcUazjOmg6yoNtW-M3miZv9j_CHqiTAzhkYYIJLolTwflkdS0XB5vWch4EXa0cmCVasUsA.o-cQAva_OeyHB9WKS7NInA.3T9_xhySQmw6H5b-0EqIqMG3mSI5IoNAr2AgJeJxiTlQLqrNDnqzj14uCRnD9eZS4dc_xRVX2eFcYr52O0GE26yKn2ZBEPjNbRetr3k9Pjo.UfaSXbec77Vu5s3CRpF0LQ6OXwNmj8HLuu3YgWnwKbA",
"ownerName": "Test ACH",
"checkoutAttemptId": "1abfc9d6-d772-4e20-ac64-9e91f69c7ced168399112189666E679D2DD6A75F696A21C2B1AF8CF93157F267033BA1FC8F2B7B11A722787E5"
},
"billingAddress": {
"stateOrProvince": "CA",
"houseNumberOrName": "N/A",
"country": "US",
"street": "1 Mission St",
"city": "San Francisco",
"postalCode": "94105"
},
"clientStateDataIndicator": true
To Reproduce
Follow the test section of the ACH payment method doc for Components and log the state.data
from the submit callback.
Expected behavior
AchDetails.bankAccountNumber
should either be optional or be in state.data
.
Desktop (please complete the following information):
- OS: Mac OSX
- Node Version: v16.13.0
- NPM Version: 8.1.0
Additional context
None
Hi @aaronchlam ,
Thanks for raising this issue. Looking at the description you are right to report the inconsistency between our API specifications and API behavior.
I apologise for the issues you are experiencing.
I will investigate this more thoroughly and report back with an update or fix as soon as I know more.
Kind Regards,
Wouter
Adyen
hi @wboereboom any update on this issue, we are experiencing the same problem.
Hey @aaronchlam , @mercury2269,
Sorry for the wait!
I've validated the issue, and forwarded the findings to the teams that manage documentation for ACH. Once they fix the technical documentation the fix will automatically be propagated to the API library.
Kind Regards,
Wouter
Adyen
This has been fixed in v16.1.0