Skip to content

Commit

Permalink
chore(create-tag): log to get companey and customer id
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusgnreis authored Mar 21, 2024
1 parent 752e6e6 commit f6bd38c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions functions/lib/freteclick/create-tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = async (order, token, storeId, appData, appSdk) => {
peopleId,
companyId
} = await getCompanyId(token)
console.log('people id and company id', peopleId, companyId)
const customer = order.buyers && order.buyers.length && order.buyers[0]
const address = order.shipping_lines && order.shipping_lines.length && order.shipping_lines[0] && order.shipping_lines.length && order.shipping_lines[0].to
const retrieve = {
Expand All @@ -32,6 +33,7 @@ module.exports = async (order, token, storeId, appData, appSdk) => {
const quoteId = freteClickCustom(order, 'freteclick_id')
const orderId = freteClickCustom(order, 'freteclick_order_id')
const { id } = await getOrCreateCustomer(token, customer, address)
console.log('id customer', id)
const data = {
"quote": quoteId,
"price": order.amount && order.amount.freight,
Expand Down

0 comments on commit f6bd38c

Please sign in to comment.