@uappi/public-sdk 1.23.0 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -145,7 +145,7 @@ function handleIframeMessage(event: MessageEvent): void {
|
|
|
145
145
|
purchaseOrderAction(props.option.paymentType.code, props.orderGroup);
|
|
146
146
|
facebookPurchaseOrderAction(props.orderGroup.id, props.orderGroup.values?.totalValue ?? 0);
|
|
147
147
|
} else if (cartSnapshot.value) {
|
|
148
|
-
purchaseAction(props.option.paymentType.code, cartSnapshot.value);
|
|
148
|
+
purchaseAction(props.option.paymentType.code, cartSnapshot.value, data.code);
|
|
149
149
|
facebookPurchaseAction(data.id, cartSnapshot.value);
|
|
150
150
|
} else {
|
|
151
151
|
console.error('[PaymentHosted] Carrinho indisponível: evento de tracking de compra (purchase) não foi disparado.');
|
|
@@ -6,6 +6,7 @@ import type { CartResponse } from '../../../../Api/types';
|
|
|
6
6
|
export function purchaseAction(
|
|
7
7
|
paymentMethod: string,
|
|
8
8
|
cartPayload: CartResponse,
|
|
9
|
+
transactionId: string,
|
|
9
10
|
) {
|
|
10
11
|
pushDatalayer({
|
|
11
12
|
event: 'purchase',
|
|
@@ -21,7 +22,7 @@ export function purchaseAction(
|
|
|
21
22
|
shippingOption => shippingOption.selected,
|
|
22
23
|
)!.label,
|
|
23
24
|
tax: 0,
|
|
24
|
-
transaction_id:
|
|
25
|
+
transaction_id: transactionId,
|
|
25
26
|
|
|
26
27
|
value: totalValue(cartPayload),
|
|
27
28
|
coupon: cartPayload.discountMap.coupon?.discountMainCode || '',
|