Tuesday 03 July 2007 12:10:56 am
Hi guys, Please help me :( I have not found how to solve my problem in this forum. IThe version is 3.91. When I order something and use paypal to pay for them. Sometimes it failed and got this information: checkAmount failed: Order amount (21.85) and received amount (21.85) do not match.
*21.85 is the price. This is the function in <i>/kernel/shop/classes/ezpaymentcallbackchecker.php</i>
function checkAmount( $amount )
{
$orderAmount = $this->order->attribute( 'total_inc_vat' );
if ( $orderAmount == $amount )
{
return true;
}
$this->logger->writeTimedString( "Order amount ($orderAmount) and received amount ($amount) do not match.", 'checkAmount failed' );
return false;
}
But 21.85==21.85!!! Yes, the type of $orderAmount is float(double), and $amount is string, this seems not the problem in PHP. Even I changed the datatype of $amount to float, I failed as well.
But when I bought other things with different prices, I successed! It really confuses me, any one can help me? Help~~~ Cheers.
Shinetech is the leader in next generation global application outsourcing. Shinetech combines world class technical skills, recognized expertise in advanced development methodologies and industry experience to deliver results for global enterprises. Shinetech utilizes distributed Agile methods for rapid and precise systems development.
------------------------------------------------------------------------------------------
Blog: http://www.mingxing.me
Email: [email protected]
|