Skip to content

Commit

Permalink
fix(create-transaction): ensure shipping address zip code format
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 authored Sep 6, 2023
1 parent 461dd4d commit cc2f917
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/routes/ecom/modules/create-transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ exports.post = ({ appSdk }, req, res) => {
city: to.city,
state: to.province || to.province_code,
country: to.country_code ? to.country_code.toLowerCase() : 'br',
zipcode: to.zip.replace('-', ''),
zipcode: to.zip.replace(/\D/g, '').padStart(8, '0'),
street_number: String(to.number) || 's/n',
complementary: to.complement || undefined
})
Expand Down

0 comments on commit cc2f917

Please sign in to comment.