Payment: Custom Code
Autor: Raphael L.
Visitado 3144,
Seguidores 2,
Compartilhado 32
Hello,
I am not able to write a working HTML code for my custom payment. Here you have an exemple of the custom code:
<form action="custompayment.php" method="post">
<input type="hidden" name="imOrderNo" value="[ORDER_NO]">
<input type="hidden" name="imPrice" value="[PRICE]">
<input type='submit' value='Pay Now' />
</form>
The problem is that when I add this code to the website, it brokes the javascript and I am not able to add any object to my cart!
Do you have working exemple: the documentation is quite inexsistent on this functionality.
Publicado em
Hello Rapahel,
I've tested your code but I get no JS errors. Of course, the page custompayement.php is not present in my test project so I can't do further tests.
Could you upload the site on a test folder of your server and provide me the link? I'll do a test on it and see which error is thrown by JS.
Thank you!
Autor
Okay, I prefere to continue this post on the english forum:
I have just create a simple test website here: http://www.kit-boitier-ethanol.fr/test/products.html
and custompayement.php is actually a simple test page where I print all the $_POST variables in php.
And it is the same problem than in the new version of my website.
Thanks for the link. As I can see, the error is caused by the new lines characters of your custom HTML code.
We have fixed this problem since version 9.0.3.1722 (beta) where the newline chars are escaped.
You can solve that problem in 3 ways:
Thank you!
Autor
And the error with Chrome is x5cart.js:75 Uncaught SyntaxErrror: Unexepected token ILLEGAL
Hi,
That's the same error. Did you remove all the line feeds from the HTML code?
On Chrome make sure your pressed CTRL+F5 to reload the js file.
Thank you!