Storefront permissions app sets 'documentType' as 'cpf'
B2B
•
ID: 798330
Fixed
Published on4/27/2023
•
Last updated on5/23/2023
1 min read
Summary
The storefront permissions app always sets the field "clientProfileData.documentType" as "cpf" in the orderForm. This may cause the transaction to be denied by the provider.
Simulation
- Install the B2B Suite;
- Configure an organization;
- Access the website and place an order.
Workaround
Use the snippet below to replace the "documentType" from your country in the orderForm
vtexjs.checkout .getOrderForm() .then(function(orderForm) { var clientProfileData = orderForm.clientProfileData clientProfileData.documentType = 'add here the key for' return vtexjs.checkout.sendAttachment( "clientProfileData", clientProfileData ) }) .done(function(orderForm){})