Jump to content
  • 0
Sign in to follow this  
Lampard

Allowing HTML & JS SCRIPT in Offline Payment

Question

Hello,

There are some payment methods that doesn't have Blesta Integration now at least all i could is to add a JS script for Pay now button but found out that JS & HTML can't be used in an instruction block.

Can anyone help me how to allow JS and HTML in instruction? Would be really appreciated.

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0
8 hours ago, activa said:

A sample of your js file?

Normally you should pass amount and id for the most of gateway and this cant be manual !

It is not a JS file though, i am just adding a JS code which is "Pay now" button in order to open the payment page on the client area automatically. I just need to know how we can allow use of JS & HTML in instruction block.

Share this post


Link to post
Share on other sites
  • 0

The problem is fixed, just looked at some old threads and found the solution.
I will also mention how to allow HTML and JS in the instruction block.

Go to: /components/gateways/nonmerchant/offline/views/default/process.pdt

You will see this in there, so remove this:
 

<?php
echo $this->TextParser->encode("markdown", $this->Html->ifSet($meta['instructions']));
?>

Add this now:
 

<?php
echo $this->Html->ifSet($meta['instructions']);
?>

 

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, Lampard said:

The problem is fixed, just looked at some old threads and found the solution.
I will also mention how to allow HTML and JS in the instruction block.

Go to: /components/gateways/nonmerchant/offline/views/default/process.pdt

You will see this in there, so remove this:
 


<?php
echo $this->TextParser->encode("markdown", $this->Html->ifSet($meta['instructions']));
?>

Add this now:
 


<?php
echo $this->Html->ifSet($meta['instructions']);
?>

 

Make attention to XSS issue .

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×