Skip to content

Commit

Permalink
proposed payload for PPCP AXO loader
Browse files Browse the repository at this point in the history
  • Loading branch information
siddy2181 committed Nov 8, 2023
1 parent 699338f commit d75daed
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions src/connect/component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,25 @@ export const getConnectComponent = async (merchantProps) => {
// TODO: Sort out integration specifics for inputs
try {
const loadResult = await loadAxo({
client: { getVersion: () => "3.97.3-connect-alpha.6.1" },
client: { getVersion: () => "3.97.3-connect-alpha.6.1" }, // this is currently supported for BT
sdkVersion: "", // PPCP proposal: string instead of function
minified: false,
});

// FPTI: sdkversion, fraudnet info
return await window.braintree.connect.create({
...loadResult.metadata,
...merchantProps,
authorization: userIdToken,
deviceData: JSON.stringify({
correlation_id: cmid,
}),
clientID,
...loadResult.metadata, // returns a localeURL for assets
...merchantProps, // AXO specific props
ppcp: {
userIdToken, // <merchant-specified-via-data-user-id-token>
clientID, // <merchant-specified-to-SDK-on-query-param>
clientMetadataID: cmid, // <merchant-specified-via-data-client-metadata-id>
fraudnet: () => {
return "";
}, // Pattern TBD
},
});
} catch (error) {
// FPTI Log here
return new Error(error);
}
};

0 comments on commit d75daed

Please sign in to comment.