Closed kalsi94 closed 3 years ago
Infact getting the "Indian Rupee php warning message htmlspecialchas()...." issue displayed in the modules currency configuration page itself.
Change to this on Line 69. <<<EOT and EOT; is the problem
$html = "
<!DOCTYPE html>
<body>
<script src='https://checkout.razorpay.com/v1/checkout.js'></script>
<script>
var data = $json;
data.handler = function (transaction) {
document.getElementById('razorpay_payment_id').value = transaction.razorpay_payment_id;
document.getElementById('razorpay_signature').value = transaction.razorpay_signature;
document.getElementById('razorpay-form').submit();
};
data.modal = {};
data.modal.ondismiss = function() {
document.getElementById('razorpay-form').submit();
}
function razorpaySubmit(){
var rzp1 = new Razorpay(data);
rzp1.open();
rzp1.modal.options.backdropClose = false;
}
window.onload = function() {
razorpaySubmit();
};
</script>
<form name='razorpay-form' id='razorpay-form' action='$url'' target='_parent' method='POST'>
<input type='hidden' name='razorpay_payment_id' id='razorpay_payment_id' />
<input type='hidden' name='razorpay_signature' id='razorpay_signature'/>
</form>
</body>
</html>
";
ParseError Message
syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) Error at
app/payments/razorpay/RazorpayPayment.php, line: 113 Backtrace
File: app/controllers/frontend/checkout.php Line: 858 Function: include File: app/functions/fn.control.php Line: 679 Function: include File: app/functions/fn.control.php Line: 430 Function: fn_run_controller File: index.php Line: 25 Function: fn_dispatch
were u able to fix this issue as I m also facing the same.
Change to this on Line 69. <<<EOT and EOT; is the problem
$html = " <!DOCTYPE html> <body> <script src='https://checkout.razorpay.com/v1/checkout.js'></script> <script> var data = $json; data.handler = function (transaction) { document.getElementById('razorpay_payment_id').value = transaction.razorpay_payment_id; document.getElementById('razorpay_signature').value = transaction.razorpay_signature; document.getElementById('razorpay-form').submit(); }; data.modal = {}; data.modal.ondismiss = function() { document.getElementById('razorpay-form').submit(); } function razorpaySubmit(){ var rzp1 = new Razorpay(data); rzp1.open(); rzp1.modal.options.backdropClose = false; } window.onload = function() { razorpaySubmit(); }; </script> <form name='razorpay-form' id='razorpay-form' action='$url'' target='_parent' method='POST'> <input type='hidden' name='razorpay_payment_id' id='razorpay_payment_id' /> <input type='hidden' name='razorpay_signature' id='razorpay_signature'/> </form> </body> </html> ";
Yeah, changing the html code to this worked for me
Change to this on Line 69. <<<EOT and EOT; is the problem
$html = " <!DOCTYPE html> <body> <script src='https://checkout.razorpay.com/v1/checkout.js'></script> <script> var data = $json; data.handler = function (transaction) { document.getElementById('razorpay_payment_id').value = transaction.razorpay_payment_id; document.getElementById('razorpay_signature').value = transaction.razorpay_signature; document.getElementById('razorpay-form').submit(); }; data.modal = {}; data.modal.ondismiss = function() { document.getElementById('razorpay-form').submit(); } function razorpaySubmit(){ var rzp1 = new Razorpay(data); rzp1.open(); rzp1.modal.options.backdropClose = false; } window.onload = function() { razorpaySubmit(); }; </script> <form name='razorpay-form' id='razorpay-form' action='$url'' target='_parent' method='POST'> <input type='hidden' name='razorpay_payment_id' id='razorpay_payment_id' /> <input type='hidden' name='razorpay_signature' id='razorpay_signature'/> </form> </body> </html> ";
Yeah, changing the html code to this worked for me
thnx, it worked for me as well.
ParseError Message
syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) Error at