Airwallex logo

Build and upload the cartridge

Clone the repository, build the cartridge source code, and upload it to your SFCC realm.

Copy for LLMView as Markdown

To deploy the Airwallex Payments Cartridge to your Salesforce Commerce Cloud (SFCC) realm, clone the repository, build the source code, and upload the compiled cartridges using WebDAV.

Before you begin

  • You have Node.js 18.x or later installed on your local machine.
  • You have a WebDAV access key generated from SFCC Account Manager. See the Salesforce documentation on WebDAV authentication .
  • You have prepared and imported the metadata into your SFCC realm.

Clone the repository and install dependencies

  1. Clone the cartridge repository and navigate to the project directory:

    Shell
    1git clone <repository-url>
    2cd payment-plugin-salesforce
  2. Install the project dependencies:

    Shell
    1npm install

Build the cartridge

Run the build command to compile the TypeScript source and generate the deployable cartridges:

Shell
1npm run build

This compiles the TypeScript source in src/ and outputs deployable JavaScript to the cartridges/ directory. It also builds the Business Manager React UI.

Configure your SFCC connection

Create a dw.json file in the project root with your SFCC credentials:

JSON
1{
2 "hostname": "your-sfcc-realm.dx.commercecloud.salesforce.com",
3 "username": "[email protected]",
4 "password": "your-webdav-access-key",
5 "code-version": "version_to_upload_to"
6}
FieldDescription
hostnameYour SFCC realm hostname (from Business Manager > Administration > Site Development > Development Setup).
usernameYour Business Manager username.
passwordYour WebDAV access key (not your Business Manager password — generate from Account Manager > API Client).
code-versionThe active code version on your realm (visible in Business Manager > Administration > Site Development > Code Deployment).

Do not commit credentials

The dw.json file is git-ignored by default. Never commit this file to version control.

Upload the cartridge

Run the upload command to deploy all three cartridges (int_airwallex, app_airwallex, bm_airwallex) to your realm:

Shell
1npm run uploadCartridge

You can also upload individual cartridges:

Shell
1npm run uploadCartridge:int # int_airwallex only
2npm run uploadCartridge:app # app_airwallex only
3npm run uploadCartridge:bm # bm_airwallex only

Use custom cartridge names

If your project requires custom cartridge names, create a .env file with:

Shell
1INT_AIRWALLEX_CARTRIDGE_NAME=int_airwallex_custom
2BM_AIRWALLEX_CARTRIDGE_NAME=bm_airwallex_custom
3APP_AIRWALLEX_CARTRIDGE_NAME=app_airwallex_custom

Then use the :env variant of the upload command:

Shell
1npm run uploadCartridge:env

Next steps

Now that you have uploaded the cartridge, register it in Business Manager so SFCC loads it:

Was this page helpful?