File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
src/components/modal/v2/lib Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,19 @@ import { isIframe } from './utils';
66const IOS_INTERFACE_NAME = 'paypalMessageModalCallbackHandler' ;
77const ANDROID_INTERFACE_NAME = 'paypalMessageModalCallbackHandler' ;
88
9+ const getAccount = ( merchantId , clientId , payerId ) => {
10+ if ( merchantId ) {
11+ return merchantId ;
12+ }
13+
14+ // Logger endpoint expects account field to be prefixed if the value is a clientId
15+ if ( clientId ) {
16+ return `client-id:${ clientId } ` ;
17+ }
18+
19+ return payerId ;
20+ } ;
21+
922const setupBrowser = props => {
1023 window . xprops = {
1124 // We will never recieve new props via this integration style
@@ -39,7 +52,7 @@ const setupBrowser = props => {
3952 // TODO: This should likely be specific to this integration type
4053 type : 'modal' ,
4154 // messageRequestId,
42- account : merchantId || clientId || payerId ,
55+ account : getAccount ( merchantId , clientId , payerId ) ,
4356 trackingDetails
4457 }
4558 } ;
You can’t perform that action at this time.
0 commit comments