paypal sandbox error

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 9 months ago #38502

That's correct. Make sure that the "send order details" of the paypal plugin is turned on and try again, it should work.

Please Log in or Create an account to join the conversation.

  • Posts: 92
  • Thank you received: 0
12 years 9 months ago #38540

Good Morning!
Any result?
Regs.,
Jade

Please Log in or Create an account to join the conversation.

  • Posts: 92
  • Thank you received: 0
12 years 9 months ago #38541

OK
I'll try it asap.

Please Log in or Create an account to join the conversation.

  • Posts: 92
  • Thank you received: 0
12 years 9 months ago #38577

Hi,
It still have problem for the decimal place.
(set TAX is disable)

May be the problem is during input the Unit Price then the TAX will AUTO filling in.
For example:
1. when input unit price: 1.90 then the TAX will auto input as 1.899999999~
2. when input unit price: 1.01 then the TAX will auto input as 1.010000000~

3. when input unit price: 1.00 then the TAX will auto input as 1
4. when input unit price: 1 then the TAX will auto input as 1

There for if without any decimal can work correctly.

Please advise.
Thanks!
Jade

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 9 months ago #38705

The input is not a problem.

Let's do it differently then. Everywhere you have:
(int)$currency->currency_locale

in the plugins/hikashoppayment/paypal.php file, please replace that piece by:
2

That way, we'll be sure that all the prices sent to paypal are rounded properly.

Please Log in or Create an account to join the conversation.

  • Posts: 92
  • Thank you received: 0
12 years 9 months ago #38715

Morning!

RE: modify the paypal.php file

To avoid my mistake, please advise is the step as following??


Step 1) add the line:
$currency->currency_locale = 2;

after the lines:
$currency=$currencies[$order->order_currency_id];


Step 2) instead of :
$vars["amount_".$i]=round($product->order_product_price,(int)$currency->currency_locale);

change it to:

$vars["amount_".$i]=round($product->order_product_price,2);

in that file.


Step 3)Make sure that the "send order details" of the paypal plugin is turned on


Step 4)
Let's do it differently then. Everywhere you have:
(int)$currency->currency_locale

in the plugins/hikashoppayment/paypal.php file, please replace that piece by:
2

======================================================================================
Thanks in advance!
Jade

Please Log in or Create an account to join the conversation.

  • Posts: 92
  • Thank you received: 0
12 years 9 months ago #38757

Hi Nicolas,

RE : Step 4)
Let's do it differently then. Everywhere you have:
(int)$currency->currency_locale

in the plugins/hikashoppayment/paypal.php file, please replace that piece by:
2

Did you mean like this?

$vars["amount_1"]=round($order->cart->full_total->prices[0]->price_value_with_tax,(int)$currency->currency_locale);

change it to:
$vars["amount_1"]=round($order->cart->full_total->prices[0]->price_value_with_tax,(int)$currency->currency_locale=2);

=============================================================================================================

$tax+=round($product->order_product_tax,(int)$currency->currency_locale)*$product->order_product_quantity;
$i++;

change it to:
$tax+=round($product->order_product_tax,(int)$currency->currency_locale=2)*$product->order_product_quantity;
$i++;

=============================================================================================================

$vars["amount_".$i]=round($order->order_shipping_price,(int)$currency->currency_locale);

change it to:
$vars["amount_".$i]=round($order->order_shipping_price,(int)$currency->currency_locale=2);


===============================================================================================================

$vars["discount_amount_cart"]=round($order->order_discount_price,(int)$currency->currency_locale);

change it to:
$vars["discount_amount_cart"]=round($order->order_discount_price,(int)$currency->currency_locale=2);


================================================================================================================

$price_check = round($dbOrder->order_full_price, (int)$currency->currency_locale );

change it to:

$price_check = round($dbOrder->order_full_price, (int)$currency->currency_locale=2 );

================================================================================================================


Total 4 of above right?

Thanks!
Jade

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 9 months ago #38921

Almost but yes.

I said to replace one by the other, not to have both.

So, for example:
$vars["amount_1"]=round($order->cart->full_total->prices[0]->price_value_with_tax,(int)$currency->currency_locale);

should become:
$vars["amount_1"]=round($order->cart->full_total->prices[0]->price_value_with_tax,2);

Please Log in or Create an account to join the conversation.

Time to create page: 0.068 seconds
Powered by Kunena Forum