ebs payment gateway integration

  1. First we have to post this form to ebs 
<?php
$hash = “ebskey”.”|”.$_POST[‘account_id’].”|”.$_POST[‘amount’].”|”.$_POST[‘reference_no’].”|”.$_POST[‘return_url’].”|”.$_POST[‘mode’];$secure_hash = md5($hash);
?>
<form method=”post” action=”https://secure.ebs.in/pg/ma/sale/pay” name=”frmTransaction” id=”frmTransaction” onSubmit=”return validate()”>
<input name=”account_id” type=”hidden” value=”<?php echo $_POST[‘account_id’] ?>”><input name=”return_url” type=”hidden” size=”60″ value=”<?php echo $_POST[‘return_url’] ?>” />
<input name=”mode” type=”hidden” size=”60″ value=”<?php echo $_POST[‘mode’]?>” />
<input name=”reference_no” type=”hidden” value=”<?php echo $_POST[‘reference_no’] ?>” />
<input name=”amount” type=”hidden” value=”<?php echo $_POST[‘amount’]?>”/>
<input name=”description” type=”hidden” value=”<?php echo $_POST[‘description’] ?>” />
<input name=”name” type=”hidden” maxlength=”255″ value=”<?php echo $_POST[‘name’] ?>” />
<input name=”address” type=”hidden” maxlength=”255″ value=”<?php echo $_POST[‘address’] ?>” />
<input name=”city” type=”hidden” maxlength=”255″ value=”<?php echo $_POST[‘city’] ?>” />
<input name=”state” type=”hidden” maxlength=”255″ value=”<?php echo $_POST[‘state’] ?>” />
<input name=”postal_code” type=”hidden” maxlength=”255″ value=”<?php echo $_POST[‘postal_code’] ?>” />
<input name=”country” type=”hidden” maxlength=”255″ value=”<?php echo $_POST[‘country’] ?>” />
<input name=”phone” type=”hidden” maxlength=”255″ value=”<?php echo $_POST[‘phone’] ?>” />
<input name=”email” type=”hidden” size=”60″ value=”<?php echo $_POST[’email’]?>” />
<input name=”ship_name” type=”hidden” maxlength=”255″ value=”<?php echo $_POST[‘ship_name’] ?>” />
<input name=”ship_address” type=”hidden” maxlength=”255″ value=”<?php echo $_POST[‘ship_address’] ?>” />
<input name=”ship_city” type=”hidden” maxlength=”255″ value=”<?php echo $_POST[‘ship_city’] ?>” />
<input name=”ship_state” type=”hidden” maxlength=”255″ value=”<?php echo $_POST[‘ship_state’] ?>” />
<input name=”ship_postal_code” type=”hidden” maxlength=”255″ value=”<?php echo $_POST[‘ship_postal_code’] ?>” />
<input name=”ship_country” type=”hidden” maxlength=”255″ value=”<?php echo $_POST[‘ship_country’] ?>” />
<input name=”ship_phone” type=”hidden” maxlength=”255″ value=”<?php echo $_POST[‘ship_phone’] ?>” />
<input name=”secure_hash” type=”hidden” size=”60″ value=”<?php echo $secure_hash;?>” />
<input name=”submitted” value=”Submit” type=”submit” />
</form>

2. After payment it redirects to your site as return URL

<?php
$secret_key = “ebskey”; // Your Secret Key
if(isset($_GET[‘DR’])) {
require(‘Rc43.php’);
$DR = preg_replace(“/\s/”,”+”,$_GET[‘DR’]);$rc4 = new Crypt_RC4($secret_key);
$QueryString = base64_decode($DR);
$rc4->decrypt($QueryString);
$QueryString = explode(‘&’,$QueryString);$response = array();
foreach($QueryString as $param){
$param = explode(‘=’,$param);
$response[$param[0]] = urldecode($param[1]);
}
}
?><?php
foreach( $response as $key => $value) {
?><p class=”fieldName” width=”50%”><?php echo $key; ?></td>
<p class=”fieldName” align=”left” width=”50%”><?php echo $value; ?></p>
<?php
}
?>

3. Required file is  Rc4.php

download it from ebs site.

all necessary file you will get from

click here

Please follow and like us:
0