0

Paypal 显示错误

TIMESTAMP: 2012-05-07T12:17:49Z CORRELATIONID: 37a2b3f9a2901 ACK: Failure VERSION: 76.0 BUILD: 2860716 L_ERRORCODE0: 10413 L_SHORTMESSAGE0: 由于参数无效,交易被拒绝。有关详细信息,请参阅其他错误消息。L_LONGMESSAGE0:购物车项目总金额与订单金额不匹配。orderreview.phpL_SEVERITYCODE0:错误,但我在参数解析期间使用了以下代码

$personName        = $_REQUEST['PERSONNAME'];
           $SHIPTOSTREET      = $_REQUEST['SHIPTOSTREET'];
           $SHIPTOCITY        = $_REQUEST['SHIPTOCITY'];
           $SHIPTOSTATE       = $_REQUEST['SHIPTOSTATE'];
           $SHIPTOCOUNTRYCODE = $_REQUEST['SHIPTOCOUNTRYCODE'];
           $SHIPTOZIP         = $_REQUEST['SHIPTOZIP'];
           $count             = $_REQUEST['COUNT'];
           $shippingch        = $_REQUEST['shipping_charge'];

           $L_NAME            = 'L_NAME';
           $itemamt = 0.00;
           $itemstr = '';
           $amtstr = '';
           $qtystr = '';
           for($i=0; $i<=$count; $i++){
            $temp_lname = 'L_NAME'.$i;
            $temp_lamt = 'L_AMT'.$i;
            $temp_lqty = 'L_QTY'.$i;

           $$temp_lname     = $_REQUEST['L_NAME'.$i];
           $$temp_lamt            = $_REQUEST['L_AMT'.$i];
           $$temp_lqty           =  $_REQUEST['L_QTY'.$i];
           $itemamt=($itemamt+($$temp_lqty*$$temp_lamt));
           $itemstr.='&L_NAME'.$i.'='.$_REQUEST['L_NAME'.$i];
           $amtstr.='&L_AMT'.$i.'='.$_REQUEST['L_AMT'.$i];
           $qtystr.='&L_QTY'.$i.'='.$_REQUEST['L_QTY'.$i];
           }



           $returnURL =urlencode($url.'/ReviewOrder.php?currencyCodeType='.$currencyCodeType.'&paymentType='.$paymentType);
           $cancelURL =urlencode("$url/SetExpressCheckout.php?paymentType=$paymentType" );



           $shiptoAddress = "&SHIPTONAME=$personName&SHIPTOSTREET=$SHIPTOSTREET&SHIPTOCITY=$SHIPTOCITY&SHIPTOSTATE=$SHIPTOSTATE&SHIPTOCOUNTRYCODE=$SHIPTOCOUNTRYCODE&SHIPTOZIP=$SHIPTOZIP";


           $nvpstr="&ADDRESSOVERRIDE=1$shiptoAddress".$itemstr."".$amtstr."".$qtystr."&MAXAMT=".(string)$maxamt."&AMT=".(string)$amt."&ITEMAMT=".(string)$itemamt."&CALLBACKTIMEOUT=4&L_SHIPPINGOPTIONAMOUNT1=$shippingch&L_SHIPPINGOPTIONlABEL1=UPS Next Day Air&L_SHIPPINGOPTIONNAME1=UPS Air&L_SHIPPINGOPTIONISDEFAULT1=true&L_SHIPPINGOPTIONAMOUNT0=$shippingch&L_SHIPPINGOPTIONLABEL0=UPS Ground 7 Days&L_SHIPPINGOPTIONNAME0=Ground&L_SHIPPINGOPTIONISDEFAULT0=false&INSURANCEAMT=1.00&INSURANCEOPTIONOFFERED=true&CALLBACK=https://www.ppcallback.com/callback.pl&SHIPPINGAMT=$shippingch&SHIPDISCAMT=-3.00&TAXAMT=2.00&L_NUMBER0=1000&L_DESC0=Size: 8.8-oz&L_NUMBER1=10001&L_DESC1=Size: Two 24-piece boxes&L_ITEMWEIGHTVALUE1=0.5&L_ITEMWEIGHTUNIT1=lbs&ReturnUrl=".$returnURL."&CANCELURL=".$cancelURL ."&CURRENCYCODE=".$currencyCodeType."&PAYMENTACTION=".$paymentType;

如果我使用的运费硬编码为 8.00,则此代码有效。

可能是什么问题呢?

4

1 回答 1

0

If you receive this error, be sure the total of the payment detail item parameters, such as ItemTotal, HandlingTotal, TaxTotal, and so forth add up to the order total.

于 2012-05-07T13:01:50.970 回答