WebSite X5Help Center

 
Raphael L.
Raphael L.
User

Payment: Custom Code  en

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
5 RESPOSTAS
Incomedia
Claudio N.
Incomedia

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!

Ler mais
Publicado em de Claudio N.
Raphael L.
Raphael L.
User
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.

Ler mais
Publicado em de Raphael L.
Incomedia
Claudio N.
Incomedia

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:

  1. Type your HTML code on a single line. It means that you should not press the return button while typing your custom HTML code in the payment settings.
  2. Update to the latest beta version as described here: http://beta.websitex5.com
  3. Wait for the next stable release (available in the next 1-2 days).

Thank you!

Ler mais
Publicado em de Claudio N.
Raphael L.
Raphael L.
User
Autor

And the error with Chrome is x5cart.js:75 Uncaught SyntaxErrror: Unexepected token ILLEGAL

Ler mais
Publicado em de Raphael L.
Incomedia
Claudio N.
Incomedia

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!

Ler mais
Publicado em de Claudio N.