Eazypay ICICI bank payment gateway Integration (Core PHP)
Steps To Integrate Eazypay Payment Gateway in PHP
Required Parameter
1. Merchant Id (Mandatory)
3. Encryption key (AES Key)(Mandatory)
4. Merchant reference number(optional)
5. Return URL(optional)
6. DEFAULT_BASE_URL = 'https://eazypay.icicibank.com/EazyPG?'; // Default URL from icici bank
Process for Integration
1. Make class for Eazypay (ICICI Bank)payment gateway integration
<?php
class Eazypay
{
}
?>
2. Generate Payment URL
<?php
function generatePaymentUrl($mandatoryField, $optionalField, $amount, $reference_no)
{
}
?>
3. Generate Encrypted value
<?php
protected function getEncryptValue($str) // Encryption method {
}
?>
4. Submit the html form
Resoponse From Server side
<html>
<body>
<?php if(payment_success_exec()): ?>
<?php
include "thank-you.php"; // Insert any content into the file you
// wish to display to the user when the payment is successful
?>
<?php else: ?>
<?php
$response = response_code($_POST['Response_Code']);
echo "<div style='text-align:center; width: 100%;font-size:20px;'><p>Transaction
failed due to some reason. Please check with your bank if amount has been deducted.</p>
<p>Sorry for the inconvenience caused.</p>";
echo "<p>Your bank has returned the following error message: <b>".$response."
</b></p>";
echo "<p> Click <a href='https://example.com/'>here</a> to return to the home
page</p></div>";
?>
<?php endif; ?>
</body>
</html>
Save above code in a file and pass the required value, Like amount reference number etc.
Before Encryption EX.
<?php
echo "https://eazypay.icicibank.com/EazyPG?merchantid=100011&
mandatory fields=8061|1234|80| 90002450001
&optional fields=20|20|20|20
&returnurl= http://website.com/cbc/action.php&Reference No=8001
&submerchantid=1234&transaction amount=80&paymode=9"
?>
After Encryption EX.
<?php
echo "https://eazypay.icicibank.com/EazyPG?merchantid=100011
&mandatory fields=u65A+ywICIypfrJVQp9ED2VlkBzkIimiHhLXPyo2P14=
&optional fields=faJ6BJUlOqjoV/AEbw5X4g==
&returnurl=6WvzNalyXvqOX+aY9ee5oKm8FT+YUF5sz940o6QZvx0=
&ReferenceNo=X7VX+1ZnKq+o6K2QWCTERQ==
&submerchantid=QVZkBomDLSbitS4C9lGaUA==
&transactionamount=aTRTaIdS0sLyzGCxL3Y5dQ==
&paymode=nFRjDWSCg0m80aUYivDlqw=="
?>
After encryption payment page is showing
In case you have any questions, do let me know.
Also offer
GST billing software
Stock Management software
Mobile application development
Payment Gateway Integration(core PHP, Laravel and Python)
Prime Programmer
8795202855