You can configure the ServerSDK for use with the client-side SDK or with the proxy server SDK.
Client-Side SDK
Using the client-side implementation, the Digital Commerce APIs are called directly from the client for guest users. After signing in, all Digital Commerce APIs are called from ServerSDK.
Proxy SDK
Using the Proxy SDK, all Digital Commerce APIs are called from ServerSDK. The Proxy SDK library is very light weight and shares the same signatures as the other Digital Commerce client SDK, requiring no code changes in the user interface.
Digital Commerce Lightning Web Component Setup
Add Digital Commerce Lightning Web Component client setup information (on-Platform customers can also use ServerSDK to log in using third-rd party authentication server).
Edit your LWC component HTML include file \<c-dc-sample-app>\</c-dc-sample-app> component with the attributes shown here:
<c-dc-sample-app
checkout-api-url=""
secure-server-api-request-credentials=""
checkout-payment-url=""
enable-proxy-sdk=""
auth-configuration=""
>
</c-dc-sample-app>
| Attribute | Description |
|---|---|
| checkout-api-url | Contains a value that specifies the URL where ServerSDK is hosted. |
| secure-server-api-request-credentials | Contains a value that specifies a value indicating whether the user agent should send cookies to the secure server if it is hosted on another domain in the case of cross-origin requests. Possible values are: include,omit and same-origin (default value) |
| checkout-payment-url | Contains a value that specifies the checkout payment URL. |
| enable-proxy-sdk | Contains a boolean value (true or false). The default valus is false. If set to true, the Digital Commerce, Account, Translation Proxy SDK instances will be created. |
| auth-configuration | Contains your Firebase or custom auth configuration details. You can create custom auth config by overriding dcCustomAuthenticationUtil. |