WebSite X5Help Center

Andre Kruger
Andre Kruger

I need help with setting up custom payment  en

Autor: Andre Kruger
Visitado 426, Followers 1, Compartido 0  

I have trouble with the format of the [PRICE]

I attached a screenshot of the error message.

In what format is  [PRICE] ?

It seems I need it in this format "12345.89"

I asume that [PRICE] is passed down as an integer ie"1234589"

How can I convert it to 2 point decimal to use as currency?

The url is

<form action="" method="post">
<input type="hidden" name="merchant_id" value="10000100">
<input type="hidden" name="merchant_key" value="46f0cd694581a">
<input type="hidden" name="return_url" value="">
<input type="hidden" name="cancel_url" value="">
<input type="hidden" name="notify_url" value="">

<input type="hidden" name="amount" value="[PRICE]">
<input type="hidden" name="item_name" value="[ORDER_NO]">
<input type="submit">

Publicado en
Aleksej H.
Aleksej H.

Hello. I sent a notification about your question to the company employees, expect an answer from them here in the comments.

Leer más
Publicado en de Aleksej H.
Stefano G.

Hello Andre

Unfortunately, this is not something that the Staff can provide support for.

The software can provide data about the order, but it's up to the user that adds the custom code to convert it accordingly. You need to implement additional custom code that receives the number and converts it to do so, but the official Staff cannot provide support for this

I will leave the topic open so that other users might eventually stop by and help you out with this

Thank you for your understanding


Leer más
Publicado en de Stefano G.

Hello André,

The Stefano's / Incomedia's reply is absolutely abnormal... Because they provide a [PRICE] variable.

So their jos is to inform us how to use this one... 
And their documentation is poorlees on the payment variables.

Again I am not agree with the previous Stefano's reply.... it is not professionnal... !! yell

So I can help you because I have developped many custom payments with no Incomedia support because their is no support. Probably no knowledge too. foot-in-mouth

You can check all my custom payments into my demo here

Try to buy a fictive product and check all offered payments.

Regarding your issue because I have already worked on Payfast, try this into you payment code.

<script type="text/javascript">

// Price with 2 decimals
var m = [PRICE];
montant = m.toFixed(2);


document.getElementById('amount').value = montant;




<input type='hidden' id='amount' name='amount' size='10'value=''><br><br>

Hope this helps



Leer más
Publicado en de Axel