Visual Studio Code Plugin
This section describes how to install the PayU plugin for Visual Studio IDE.
Plugin features
- Code snippets for common PayU integration patterns
- Boilerplate generation for different payment methods
- Syntax highlighting for PayU-specific configurations
Installation Steps
Method 1: VS Code Marketplace (Recommended)
-
Open Visual Studio Code
-
Navigate to extensions:
- Select Extensions under Activity from the menu on left pane. OR
- Use the keyboard shortcut:
Ctrl+Shift+X
(Windows/Linux) orCmd+Shift+X
(Mac)
-
Search for PayU Plugin:
- Type "PayU Payments" in the search box
- Look for "PayU Payments" by PayU Payments publisher.
-
Install the Plugin:
- Click Install.
- Wait for the installation to complete
Method 2: Direct Installation via URL
-
Open the command palette:
- Press the
Ctrl+Shift+P
(Windows/Linux) orCmd+Shift+P
(Mac) key combinations.
- Press the
-
Run Install command:
- Type "Extensions" to install from VSIX.
OR - Navigate to the following URL and click Install on the marketplace page:
- Type "Extensions" to install from VSIX.
https://marketplace.visualstudio.com/items?itemName=PayuPayments.Payu-Payments
Using the VS Code Plugin
- Create new project by creating a new directory for your project using the following MS DOS shell commands:
mkdir payu-integration-project
cd payu-integration-project
- Open project in VS Code
- Generate boilerplate code:
- Open command palette using the
Ctrl+Shift+P
(Windows/Linux) orCmd+Shift+P
(Mac) key combination. - Type "PayU" to see available commands.
- Select appropriate command based on your integration type.
- PayU: Generate Payment Form
- PayU: Generate API Integration
- PayU: Create Sample Application
- Configure environment by updating the configuration file similar to the following:
- Open command palette using the
// config.js or similar
const config = {
// For Test Environment
apiUrl: 'https://apitest.payu.in/v2/payments',
// For Production Environment
// apiUrl: 'https://api.payu.in/v2/payments',
merchantId: 'YOUR_MERCHANT_ID',
secretKey: 'YOUR_SECRET_KEY'
};
- Code snippets usage
- Type
payu-
in any JavaScript/HTML file to see available snippets
- Type
payu-payment-form
payu-api-call
payu-webhook-handler
Troubleshooting
Plugin Not Visible
- Solution: Restart your IDE after installation
- Alternative: Check if plugin is enabled in settings
Code Snippets Not Working
- Solution: Ensure you're in the correct file type (.js, .java, .html)
- Alternative: Check snippet trigger keywords
Template Generation Fails
- Solution: Verify project structure and dependencies
- Alternative: Check IDE logs for error details
Updated 5 days ago