Okay, then i was using paybox since some weeks and it works really fine for me. Thanks.

By the way, i just encoured a problem related to price. if the shopping cart total price is superior at 1000 Euros then when the client been redirected to paybox it show only 1 Euro to pay.

I think that the price isn't well formated.

Comments

rookmoot’s picture

Hm i fixed the problem like that :

// $chaine['total'] = " PBX_TOTAL=". number_format($order->order_total, 2) * 100;
$chaine['total'] = " PBX_TOTAL=".$order->order_total * 100;

I'm not sure that was the solution but maybe... It's working...

aroq’s picture

rookmoot, thnx for solution, I found that for cases with decimal totals (like 158.479) better to use:

$chaine['total'] = " PBX_TOTAL=". number_format($order->order_total, 2, '.', '') * 100;

mogtofu33’s picture

Status: Active » Patch (to be ported)

Hi,

Corrected on dev release, will be ported soon.
I think it's better to use: number_format($order->order_total, 2, variable_get('uc_currency_thou', ','), '')

Regards.
Mog.

xorne’s picture

Hi all,

I had same pb, fixed like that :

$chaine['total'] = " PBX_TOTAL=". round($order->order_total, 2) * 100;

thanx anyway for this useful module

selinav’s picture

I've the error message "Autoresponse error on order 689: Incorrect price: 8800 / 8806."
I've replaced the line
$total = number_format($order->order_total, 2) * 100;
by
$total = number_format($order->order_total, 2, variable_get('uc_currency_thou', ','), '') * 100;
and I've even the problem.

Is it compatible with VAT number?

Please help.

TataYoyo’s picture

Hi,

I applied the patch (#3) a couple of days ago and realized today there were no more decimals sent to Paybox ("37.40 €" becomes "37.00 €" - speaking about money, not separators !)

I read the code again and thought :
- I understand multiplying by 100 is necessary because paybox waits for the total value in cents (0.01 €), with nothing but numbers in the PBX_TOTAL string.
- as it needs integers, why do we try to do anything with formating ?
- did we realize we are multiplying a string by 100 ? (number_format() returns a string)

I would patch this way :
$chaine['total'] = " PBX_TOTAL=". round($order->order_total, 2) * 100;
or :
$chaine['total'] = " PBX_TOTAL=". round($order->order_total * 100, 0);
eventually :
$chaine['total'] = " PBX_TOTAL=". number_format(round($order->order_total * 100, 0), 0, '', '');

Regards.