Step 3: Register external services
Learn how to register external services.
Register external services for Tax Calculation and Payment Services. You can run these scripts from the Developer Console in an Execute Anonymous window or by the method of your choice when you register other services as part of the site setup before starting the connector setup.
Tax integration service
If you have not registered the external service for tax integration:
Use the following script to insert the Tax Calculation Apex class that comes with the package into
RegisteredExternalService
. To use the script, simply modify the<<storeName>>
variable before running.Verify that the
Tax Calculation Apex class ID
is registered with thesoql
query below. TheExternalServiceProviderId
should match the Tax Calculation Apex ClassDRB2B_CartTaxCalculations
ID in the org.
If you have already registered the external service for tax integration:
Run the following script to update the Tax Integration service to point to the Tax Calculation integration class from the Salesforce Lightning app.
Verify that the
Tax Calculation Apex class ID
is registered by making the belowsoql
query. TheExternalServiceProviderId
should match the Tax Calculation Apex ClassDRB2B_CartTaxCalculations
ID in the org.
Payment Service
Register Payment Service by the following steps:
Capture the
WebStore Id
. This will be used in the script in step 4.Create a Named Credential for Digital River with the following details:
Label: Digital River API
Name: Digital_River_API
URL: https://api.digitalriver.com
Identity Type: Named Principal
Authentication Protocol: No Authentication
Create a Payment Gateway Provider:
Sign in to Workbench from your commerce org.
Go to the Data tab and select Insert.
Go to the Object Type and select PaymentGatewayProvider.
Select Single Record and click Next.
Fill in the fields using your Payment Gateway Adapter information.
Field name Example ApexAdapterId
ID of Payment Gateway Adapter Apex class
DRB2B_PaymentGatewayAdapter
DeveloperName
DR_PaymentGateway
IdempotencySupported
Yes
MasterLabel
DR Payment Gateway
Comments
Digital River Payment Gateway Provider
Set up Payment Gateway and insert a
StoreIntegratedService
record for payment by executing the below script:
Last updated