krishna035/icici-bank-corporate-api
Composer 安装命令:
composer require krishna035/icici-bank-corporate-api
包简介
PHP implementation for integrating with ICICI Bank Corporate API.
README 文档
README
This repository provides a PHP implementation for integrating with the ICICI Bank Corporate API. It includes a core API class ICICIBankCorporateAPI for handling various ICICI Bank services such as CIB Registration, Dealer Balance Check, Dealer Collection, and Payment Status Inquiry. Additionally, a sample script is provided to demonstrate how to use the API class.
Table of Contents
Installation
-
Clone this repository to your local environment:
git clone https://github.com/krishna035/icici-bank-corporate-api-php.git
-
Ensure you have the necessary SSL certificates and public keys for ICICI Bank's Sandbox and Live environments.
-
Set up your server or local environment to run PHP scripts.
Usage
Configuration
Before using the API, you must configure your credentials and paths in the ICICIBankCorporateAPI class.
-
Client ID and Client Secret: Replace the placeholders with your actual Client ID and Client Secret for both Sandbox and Live environments.
$this->clientId = 'YOUR_SANDBOX_CLIENT_ID'; $this->clientSecret = 'YOUR_SANDBOX_CLIENT_SECRET';
-
Certificate Paths: Replace the placeholder paths with the actual file paths where your certificates and public keys are stored.
$this->caCertPath = '/path/to/your/certificates/YOUR_SANDBOX_CERTIFICATE.pem'; $this->publicKey = file_get_contents('/path/to/your/certificates/YOUR_SANDBOX_PUBLIC_KEY.cer');
Example Test Cases
The ICICICorporateAPITestCases.php script provides example usage of the ICICIBankCorporateAPI class. It includes several test cases for common API requests.
- Running the Example Script:
- Open
ICICICorporateAPITestCases.php. - Modify the
$testCasevariable to select the desired test case (e.g.,'CIBRegistration','DealerBalanceCheck', etc.). - Run the script on your server or local environment:
php ICICICorporateAPITestCases.php
- The script will output the request payload and the API response.
- Open
API Methods
CIB Registration
Registers a customer for Corporate Internet Banking (CIB).
- Method:
CIBRegistration($payload) - Payload Parameters:
AGGRNAME: Aggregator NameAGGRID: Aggregator ID (random for testing)CORPID: Corporate IDUSERID: User IDURN: Unique Reference Number
Dealer Balance Check
Checks the balance for a dealer.
- Method:
DealerBalanceCheck($payload) - Payload Parameters:
CORPID: Corporate IDUSERID: User IDAGGRID: Aggregator IDAGGRNAME: Aggregator Name
Dealer Collection
Processes a dealer collection transaction.
- Method:
DealerCollection($payload) - Payload Parameters:
CORPID: Corporate IDUSERID: User IDDEBITACCT: Debit Account NumberCREDITACCT: Credit Account NumberTXN_AMOUNT: Transaction AmountTXN_CURRENCY: Transaction Currency (e.g.,INR)URN: Unique Reference NumberAGGR_ID: Aggregator IDUNIQUE_ID: Unique Transaction ID (use thegenerateRandomKeymethod to create this)
Payment Status Inquiry
Inquires about the status of a payment transaction.
- Method:
PaymentStatusInquiry($payload) - Payload Parameters:
AGGRID: Aggregator IDCORPID: Corporate IDUSERID: User IDUNIQUEID: Unique Transaction ID (same as used inDealerCollection)URN: Unique Reference Number
Contributing
We welcome contributions to improve this library! Please fork this repository and submit a pull request with your changes.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-12-23