Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>3D</title>
- </head>
- <body>
- <form name="fo" id="a" method="POST" action="{url}">
- <button type="submit">Finalize payment</button>
- <input id="b" type="hidden" name="PaReq" value="{data}"/>
- <input id="c" type="hidden" name="TermUrl" value="{callback}"/>
- <input id="d" type="hidden" name="MD" value="{your_identifier}"/>
- </form>
- <script>
- function x(variable) {
- const query = window.location.search.substring(1);
- const vars = query.split('&');
- for (let i = 0; i < vars.length; i++) {
- const pair = vars[i].split('=');
- if (decodeURIComponent(pair[0]) === variable) {
- return decodeURIComponent(pair[1]);
- }
- }
- }
- const obj = JSON.parse(sessionStorage.getItem('3d'));
- document.querySelector('#a').action = x('url');
- document.querySelector('#b').value = x('data');
- document.querySelector('#c').value = x('callback');
- document.querySelector('#d').value = x('orderId');
- document.fo.submit();
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement