English 中文(简体)
参数四舍五入的薪差错
原标题:Paypal error during parameter parsing
  • 时间:2012-05-07 12:52:34
  •  标签:
  • php
  • paypal

Paypal显示错误

TIMESTAMP: 2012-05-07T12:17:49Z CORRELATIONID: 37a2b3f9a2901 ACK: Failure VERSION: 76.0 BUILD: 2860716 L_ERRORCODE0: 10413 L_SHORTMESSAGE0: Transaction refused because of an invalid argument. See additional error messages for details. L_LONGMESSAGE0: The totals of the cart item amounts do not match order amounts. L_SEVERITYCODE0: Error but I used the following code of orderreview.php during parameter parsing

$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条硬编码,则该法典正在发挥作用。

问题是什么?

问题回答

如果你收到这一错误,则确保付款细目项目参数总额,如项目Total、处理Total、征税等,并按总额计算。





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签