Comments (6)
Can we use any alternative method for mcrypt_module_open(), because I am facing same issue on my vagrant machine.
from indipay.
Hope this will solve it!
Previous Code: © Indipay
File Name: src/Gateways/CCAvenueGateway.php Line No. 108
/**
* CCAvenue Encrypt Function
*
* @param $plainText
* @param $key
* @return string
*/
protected function encrypt($plainText,$key)
{
$secretKey = $this->hextobin(md5($key));
$initVector = pack("C*", 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f);
$openMode = @mcrypt_module_open(MCRYPT_RIJNDAEL_128, '','cbc', '');
$blockSize = @mcrypt_get_block_size(MCRYPT_RIJNDAEL_128, 'cbc');
$plainPad = $this->pkcs5_pad($plainText, $blockSize);
if (@mcrypt_generic_init($openMode, $secretKey, $initVector) != -1)
{
$encryptedText = @mcrypt_generic($openMode, $plainPad);
@mcrypt_generic_deinit($openMode);
}
return bin2hex($encryptedText);
}
/**
* CCAvenue Decrypt Function
*
* @param $encryptedText
* @param $key
* @return string
*/
protected function decrypt($encryptedText,$key)
{
$secretKey = $this->hextobin(md5($key));
$initVector = pack("C*", 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f);
$encryptedText=$this->hextobin($encryptedText);
$openMode = @mcrypt_module_open(MCRYPT_RIJNDAEL_128, '','cbc', '');
@mcrypt_generic_init($openMode, $secretKey, $initVector);
$decryptedText = @mdecrypt_generic($openMode, $encryptedText);
$decryptedText = rtrim($decryptedText, "\0");
@mcrypt_generic_deinit($openMode);
return $decryptedText;
}
Updated Code: © gopal-g/payment
File Name: src/Gateways/CCAvenueGateway.php Line No. 143
/**
* Function to encrypt
* @param $plainText string
* @param $key string
* @return string
*/
public function encrypt($plainText, $key){
$key = $this->hextobin(md5($key));
$initVector = pack("C*", 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f);
$openMode = openssl_encrypt($plainText, 'AES-128-CBC', $key, OPENSSL_RAW_DATA, $initVector);
$encryptedText = bin2hex($openMode);
return $encryptedText;
}
/**
* Function to decrypt
* @param $encryptedText string
* @param $key
* @return string
*/
public function decrypt($encryptedText, $key){
$key = $this->hextobin(md5($key));
$initVector = pack("C*", 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f);
$encryptedText = $this->hextobin($encryptedText);
$decryptedText = openssl_decrypt($encryptedText, 'AES-128-CBC', $key, OPENSSL_RAW_DATA, $initVector);
return $decryptedText;
}
from indipay.
Thanks @techoneel that worked
from indipay.
This cannot be resolved from our side. CCAvenue should modify their code to remove the deprecated functions the appropriate changes can be done.
from indipay.
Update
CCavenue has released their latest SDK for the same now we are able to integrate it on PHP 7.1 you can use my own package for the same gopal-g/payment. It is very much similar to this package.
from indipay.
Dear @gopal-g I just download the latest SDK but couldn't work
from indipay.
Related Issues (20)
- Laravel 7 support HOT 1
- Laravel 7 Support please HOT 1
- please enable Laravel 7 support HOT 1
- Enable Laraval 7 support HOT 1
- Class Softon\Indipay\Gateways\Gateway does not exist HOT 3
- Can not pay payumoney gateway because of laravel blade file's function HOT 3
- INDIPAY_WORKING_KEY HOT 1
- Can I integrate PayUBiz Payment gateway in same ? HOT 3
- Please enable Laravel8 HOT 1
- paytm ChecksumHash error HOT 3
- How to process a refund? HOT 3
- How to refund ccavenue payment
- EBS Payment Response Undefined 'transaction_status'
- PayuMoney Payment verification does not work
- Paramiter issue HOT 2
- Please Add Laravel 9 Support HOT 3
- Class indipay does not exist in laravel 5.4. i follow all steps of softon/indipay documentaion. i m using "softon/indipay": "v1.1.2"
- Updated Test Endpoint URL for PayUMoney HOT 2
- Make dynamic endpoint of the gateway class
- redirect url get expired in ccavenue.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from indipay.