Build and upload the cartridge
Clone the repository, build the cartridge source code, and upload it to your SFCC realm.
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
-
Clone the cartridge repository and navigate to the project directory:
Shell1git clone <repository-url>2cd payment-plugin-salesforce -
Install the project dependencies:
Shell1npm install
Build the cartridge
Run the build command to compile the TypeScript source and generate the deployable cartridges:
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:
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}
| Field | Description |
|---|---|
hostname | Your SFCC realm hostname (from Business Manager > Administration > Site Development > Development Setup). |
username | Your Business Manager username. |
password | Your WebDAV access key (not your Business Manager password — generate from Account Manager > API Client). |
code-version | The 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:
1npm run uploadCartridge
You can also upload individual cartridges:
1npm run uploadCartridge:int # int_airwallex only2npm run uploadCartridge:app # app_airwallex only3npm run uploadCartridge:bm # bm_airwallex only
Use custom cartridge names
If your project requires custom cartridge names, create a .env file with:
1INT_AIRWALLEX_CARTRIDGE_NAME=int_airwallex_custom2BM_AIRWALLEX_CARTRIDGE_NAME=bm_airwallex_custom3APP_AIRWALLEX_CARTRIDGE_NAME=app_airwallex_custom
Then use the :env variant of the upload command:
1npm run uploadCartridge:env
Next steps
Now that you have uploaded the cartridge, register it in Business Manager so SFCC loads it: