Jump to content
  • 0

Allowing HTML & JS SCRIPT in Offline Payment


Lampard

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.

Link to comment
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.

Link to comment
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']);
?>

 

Link to comment
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 .

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...