Skip to content

Commit

Permalink
chore(order): get correct id from data
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusgnreis committed Mar 28, 2024
1 parent 73e4306 commit e138e50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/lib/appmax/order.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ const createOrder = async (items, amount, customer_id, token) => {
})
console.log('created order', JSON.stringify(data))

if (data) {
return data.order_id
if (data && data.status === 200) {
return data.data && data.data.id
}
return null
}
Expand Down

0 comments on commit e138e50

Please sign in to comment.