Set up the Salesforce Commerce Cloud cartridges
Install the Pay.com cartridges in your Salesforce B2C Commerce instance, connect them to your Pay.com account, and take a test payment.
The Pay.com cartridges for Salesforce B2C Commerce add Pay.com as a payment method at your storefront's checkout. Install them, connect them to your Pay.com account, and take a test payment in the sandbox. What the cartridges do once they're running is in Salesforce Commerce Cloud cartridges.
Requirements
The cartridges work with the SFRA checkout, and with PWA Kit storefronts through a Custom API.
| Requirement | Version |
|---|---|
| Salesforce B2C Commerce | SFRA 6 or later, or PWA Kit through the Commerce API |
| Cartridges | 0.1.0 |
Install and connect
You connect the cartridges with an API key, created in the Pay.com dashboard, for each environment you use.
- 1
Upload the cartridges
Upload
int_pay_com,int_pay_com_sfra, andbm_pay_comto a code version, withint_pay_com_scapifor a PWA Kit storefront, and activate it. Then set the cartridge paths in Administration → Sites → Manage Sites:Site Cartridge path An SFRA storefront int_pay_com_sfra:int_pay_com:app_storefront_base, in front of your own cartridgesA PWA Kit storefront int_pay_com_scapi:int_pay_com, in front of your own cartridgesBusiness Manager bm_pay_com:int_pay_comA storefront that runs both SFRA and PWA Kit takes both.
- 2
Import the site metadata
The cartridges include a site import archive containing the site preferences, order and profile attributes, custom objects, the
PAY_COMpayment processor and payment method, the Pay.com service, and the scheduled jobs. Rename itssites/RefArchfolder, and thesite-idinjobs.xml, to your site's ID, zip it, and import it in Administration → Site Development → Site Import & Export. - 3
Give Business Manager users access
In Administration → Organization → Roles & Permissions, give
PAY_COM_SETTINGSto the roles that set up Pay.com andPAY_COM_ORDERSto the roles that capture, refund, and review payments. - 4
Enter your API keys
Go to Merchant Tools → Pay.com → Settings and Connect. In the Sandbox section, paste an
sk-pay-com-sandbox-key you created in the Pay.com dashboard into API key and click Save. Do the same with ansk-pay-com-live-key in the Live section when you take live payments. Each key is checked with Pay.com before it's saved. Saving it also reads the payment methods your Pay.com account offers in that environment, which the checkout shows. See Settings. - 5
Add the webhook
In the Pay.com dashboard, add a webhook that sends events to the URL shown on Settings and Connect, then paste its signing secret into Webhook secret in the environment's section and click Save. Do this for each environment you use, and subscribe to the 12 plugin webhook events.
- 6
Turn on Pay.com
In Merchant Tools → Site Preferences → Custom Preferences → Pay.com, set Enabled to Yes, and check that the
PAY_COMpayment method is enabled in Merchant Tools → Ordering → Payment Methods. The import also schedules the cartridge jobs (PayCom-ProcessWebhooks every minute, PayCom-Reconcile and PayCom-CaptureShipped every 15 minutes, and PayCom-RefreshPaymentMethods once a day).If your storefront has its own versions of SFRA's payment option templates,
checkout/billing/paymentOptions/paymentOptionsContent.isml,paymentOptionsSummary.isml, andpaymentOptionsTabs.isml, or ofcart/checkoutButtons.ismlandproduct/components/addToCartButtonExtension.isml, merge the cartridges' versions into them. - 7
Take a test payment
Sandbox mode is on by default, so the storefront takes payments in the sandbox. Place an order with a test card, then turn Sandbox mode off to take live payments.
Next steps
- Apple Pay: Map the domain association file and register your storefront's domain to show the Apple Pay button.
- Salesforce Commerce Cloud cartridges: What the cartridges support, how orders stay in sync with Pay.com, and the data they send.
- Settings: Every setting with its default.