
Integrating CC Avenue with Salesforce Commerce Cloud (SFCC)
If you’re looking to integrate CC Avenue as a payment gateway into your Salesforce Commerce Cloud (SFCC) store, follow this step-by-step guide. This integration allows customers to make payments securely using CC Avenue while ensuring smooth transaction processing
Step 1: Get Your CC Avenue Credentials
Before starting the integration, you need to have a Merchant ID, Access Code, and Encryption Key from CC Avenue.
- Sign up for CC Avenue
- If you don’t have an account, go to ccavenue.com and register as a merchant.
- Obtain API credentials
- Log in to your CC Avenue merchant dashboard.
- Navigate to the API section and generate your Merchant ID, Access Code, and Encryption Key.
- Keep these details safe as they’ll be required for integration.
Step 2: Configure CC Avenue in Salesforce Commerce Cloud (SFCC)
Now, let’s add CC Avenue as a payment method inside SFCC’s Business Manager.
- Go to Business Manager
- Log in to SFCC Business Manager.
- Navigate to Merchant Tools > Site Preferences > Payment Methods.
- Add CC Avenue as a Payment Method
- Click on “New Payment Method”.
- Enter CC Avenue as the name.
- Add the Merchant ID, Access Code, and Encryption Key you obtained from CC Avenue.
- Define Payment Options
- Select the currencies you want to support (e.g., INR).
- Enable payment methods like Credit/Debit Cards, Net Banking, UPI, Wallets, etc.
Step 3: Develop the Payment Processing Flow
To make the payment gateway work, we need to modify SFCC’s payment processing pipeline.
- Go to Payment Processing Section
- Navigate to Merchant Tools > Ordering > Payment Processing.
- Modify the Pipeline
- Locate the existing payment processor section.
- Add a new processor for CC Avenue.
- This processor will handle the authorization and capture of payments from CC Avenue.
Step 4: Implement Non-Seamless Payment Integration
CC Avenue supports two types of integrations: Seamless (direct checkout on your site) and Non-Seamless (redirects to CC Avenue’s payment page).
For simplicity, let’s integrate the Non-Seamless method first, where the customer is redirected to CC Avenue’s payment gateway.
- Create a Payment Hook
- Inside your SFCC project, create a hook that triggers when a payment is initiated.
- Generate Payment Request
- Prepare a request payload containing order details, amount, customer details, and return URL.
- Encrypt Payment Data
- Use CC Avenue’s encryption library to secure the request before sending it.
- CC Avenue provides encryption utilities to encrypt sensitive transaction details.
- Redirect the Customer to CC Avenue
- Create an HTML form that contains the encrypted data and automatically submits it to CC Avenue’s payment URL.
- Handle Payment Response
- Once payment is completed, CC Avenue sends a response.
- Decrypt the response to check whether the payment was successful, pending, or failed.
- Update the order status accordingly in SFCC.
Step 5: Testing & Final Implementation
Before going live, always test the integration to make sure everything works correctly.
- Use CC Avenue’s Sandbox Mode
- CC Avenue provides a test environment where you can simulate transactions before going live.
- Perform Test Transactions
- Try different scenarios like successful payment, failed transaction, and refunds to see how your system handles them.
- Go Live
- Once you are confident that the integration is working fine, switch to Live Mode in CC Avenue settings.
Final Thoughts
That’s it! You’ve successfully integrated CC Avenue with Salesforce Commerce Cloud. Now, your customers can make payments smoothly, and transactions will be handled securely.