Skip to content

Commit 3010b60

Browse files
committed
Merge branch 'feature/dynamic-messaging' into feature/DTCRCMERC-3014-offer-list-as-string
2 parents 4789687 + b35e97e commit 3010b60

File tree

2 files changed

+24
-22
lines changed

2 files changed

+24
-22
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
"@paypal/connect-loader-component": "1.1.1",
115115
"@paypal/funding-components": "^1.0.31",
116116
"@paypal/sdk-client": "^4.0.184",
117-
"@paypal/sdk-constants": "^1.0.141",
117+
"@paypal/sdk-constants": "^1.0.146",
118118
"@paypal/sdk-logos": "^2.2.6"
119119
},
120120
"lint-staged": {

Diff for: src/zoid/buttons/component.jsx

+23-21
Original file line numberDiff line numberDiff line change
@@ -726,20 +726,21 @@ export const getButtonsComponent: () => ButtonsComponent = memoize(() => {
726726
.track({
727727
[FPTI_KEY.TRANSITION]: "button_message_click",
728728
[FPTI_KEY.STATE]: "BUTTON_MESSAGE",
729+
[FPTI_KEY.BUTTON_SESSION_UID]: buttonSessionID,
729730
[FPTI_KEY.CONTEXT_ID]: buttonSessionID,
730731
[FPTI_KEY.CONTEXT_TYPE]: "button_session_id",
731732
[FPTI_KEY.EVENT_NAME]: "message_click",
732-
// adding temp string here for our sdk constants
733-
button_message_offer_type: offerType,
734-
button_message_credit_product_identifier:
733+
[FPTI_KEY.SELLER_ID]: merchantID?.join(","),
734+
[FPTI_KEY.BUTTON_MESSAGE_OFFER_TYPE]: offerType,
735+
[FPTI_KEY.BUTTON_MESSAGE_CREDIT_PRODUCT_IDENTIFIER]:
735736
creditProductIdentifier,
736-
button_message_type: messageType,
737-
button_message_position: message?.position,
738-
button_message_align: message?.align,
739-
button_message_color: message?.color,
740-
button_message_offer_country: offerCountryCode,
741-
button_message_amount: amount,
742-
[FPTI_KEY.BUTTON_SESSION_UID]: buttonSessionID,
737+
[FPTI_KEY.BUTTON_MESSAGE_TYPE]: messageType,
738+
[FPTI_KEY.BUTTON_MESSAGE_POSITION]: message?.position,
739+
[FPTI_KEY.BUTTON_MESSAGE_ALIGN]: message?.align,
740+
[FPTI_KEY.BUTTON_MESSAGE_COLOR]: message?.color,
741+
[FPTI_KEY.BUTTON_MESSAGE_OFFER_COUNTRY]: offerCountryCode,
742+
[FPTI_KEY.BUTTON_MESSAGE_CURRENCY]: currency,
743+
[FPTI_KEY.BUTTON_MESSAGE_AMOUNT]: amount,
743744
});
744745

745746
const modalInstance = await getModal(clientID, merchantID);
@@ -776,27 +777,28 @@ export const getButtonsComponent: () => ButtonsComponent = memoize(() => {
776777
offerCountryCode,
777778
creditProductIdentifier,
778779
}) => {
779-
const { message, buttonSessionID } = props;
780+
const { message, buttonSessionID, currency, merchantID } = props;
780781

781782
getLogger()
782783
.info("button_message_render")
783784
.track({
784785
[FPTI_KEY.TRANSITION]: "button_message_render",
785786
[FPTI_KEY.STATE]: "BUTTON_MESSAGE",
787+
[FPTI_KEY.BUTTON_SESSION_UID]: buttonSessionID,
786788
[FPTI_KEY.CONTEXT_ID]: buttonSessionID,
787789
[FPTI_KEY.CONTEXT_TYPE]: "button_session_id",
788790
[FPTI_KEY.EVENT_NAME]: "message_render",
789-
// adding temp string here for our sdk constants
790-
button_message_offer_type: offerType,
791-
button_message_credit_product_identifier:
791+
[FPTI_KEY.SELLER_ID]: merchantID?.join(","),
792+
[FPTI_KEY.BUTTON_MESSAGE_OFFER_TYPE]: offerType,
793+
[FPTI_KEY.BUTTON_MESSAGE_CREDIT_PRODUCT_IDENTIFIER]:
792794
creditProductIdentifier,
793-
button_message_type: messageType,
794-
button_message_posiiton: message?.position,
795-
button_message_align: message?.align,
796-
button_message_color: message?.color,
797-
button_message_offer_country: offerCountryCode,
798-
button_message_amount: message?.amount,
799-
[FPTI_KEY.BUTTON_SESSION_UID]: buttonSessionID,
795+
[FPTI_KEY.BUTTON_MESSAGE_TYPE]: messageType,
796+
[FPTI_KEY.BUTTON_MESSAGE_POSITION]: message?.position,
797+
[FPTI_KEY.BUTTON_MESSAGE_ALIGN]: message?.align,
798+
[FPTI_KEY.BUTTON_MESSAGE_COLOR]: message?.color,
799+
[FPTI_KEY.BUTTON_MESSAGE_CURRENCY]: currency,
800+
[FPTI_KEY.BUTTON_MESSAGE_OFFER_COUNTRY]: offerCountryCode,
801+
[FPTI_KEY.BUTTON_MESSAGE_AMOUNT]: message?.amount,
800802
});
801803
};
802804
},

0 commit comments

Comments
 (0)