Paypal Payment Pro Error

Permalink 2 users found helpful
Howdy guys,
I'm working with PayPal Payment Pro add-on. When I'm trying to purchase anything through Credit Card, it shows "Invalid Order Total".
I've spent a lot of time to solve this but alas!

Please help me.

Rony

ronyDdeveloper
 
citytech2 replied on at Permalink Best Answer Reply
citytech2
Hi Rony,
I'm sure you have implemented any shipping rules that is below 1.00 . I've got the similar error just 1 days before and solve it. It is nothing but a Paypal Payment Pro's bug. You can follow the instructions below:
In your controller.php of Paypal Payment Pro at line 208 it reads:
$order_total = (float) $o->getOrderTotal();


I changed it to:
$order_total = number_format($o->getOrderTotal(),2,'.','');


Also, around line 274 it has:
$fields['amount'] = (substr($o->getOrderTotal(), -3, 1) == ".") ? $o->getOrderTotal() : $o->getOrderTotal().'.00';


I changed it to:
$fields['amount'] = $o->getOrderTotal();


Hope this will work for you.

Citytech
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
Hi Citytech,
Thanks for the help. It woks fine. You have saved a lot of time for me. Thanks again.

Rony