@ns8/ns8-shopify-switches
Advanced tools
Comparing version 1.0.44 to 1.0.45
@@ -56,3 +56,3 @@ "use strict"; | ||
return transactionList.map((transaction) => { | ||
const { id, amount, currency, kind, gateway, payment_details: { avs_result_code, credit_card_bin, credit_card_company, credit_card_number, cvv_result_code, }, } = transaction; | ||
const { id, amount, currency, kind, gateway, status, payment_details: { avs_result_code, credit_card_bin, credit_card_company, credit_card_number, cvv_result_code, }, } = transaction; | ||
return new ns8_protect_models_1.Transaction({ | ||
@@ -63,2 +63,3 @@ currency, | ||
amount: parseFloat(amount), | ||
status: ns8_protect_models_1.TransactionStatus[status.toUpperCase()], | ||
creditCard: new ns8_protect_models_1.CreditCard({ | ||
@@ -88,3 +89,3 @@ gateway, | ||
const shopifyTransactionList = await client.transaction.list(order_id); | ||
const { id, name, currency, billing_address, shipping_address, customer, total_price, line_items = [], created_at, } = shopifyOrder; | ||
const { id, name, currency, billing_address, shipping_address, customer, total_price, line_items = [], created_at, client_details: { accept_language, browser_ip, user_agent, }, } = shopifyOrder; | ||
return new ns8_protect_models_1.Order({ | ||
@@ -105,2 +106,7 @@ name, | ||
hasGiftCard: hasGiftCard(line_items), | ||
session: new ns8_protect_models_1.Session({ | ||
ip: browser_ip, | ||
userAgent: user_agent, | ||
acceptLanguage: accept_language, | ||
}), | ||
}); | ||
@@ -107,0 +113,0 @@ } |
{ | ||
"name": "@ns8/ns8-shopify-switches", | ||
"version": "1.0.44", | ||
"version": "1.0.45", | ||
"description": "Custom switches for the shopify integration", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
16241
193