Hi, i am using the nvp api(express checkout) calls for parallel payment intgration,it show this error , how can i fix thsi
showing error msg:
SetExpressCheckout API call failed.Array ( [name] => Basic Plan [desc] => Basic Plan $3.00 Signup & $5.00 per month [qty] => 1 [amt] => 300 )
Detailed Error Message: The totals of the cart item amounts do not match order amounts.
Short Error Message: Transaction refused because of an invalid argument. See additional error messages for details.
Error Code: 10413
Error Severity Code: Error

here is my sample input,

my input:
$PayPalitem0_desc="item 1 description sample ."; 
$PayPalitem1_desc="item 2 description sample2 .";     
$Paypalreqname0="Depart 1 San Jose Feb 12 at 12:10PM Arrive in Baltimore at 10:22PM";     
$Paypalreqname1="Depart 2 San Jose Feb 12 at 12:10PM Arrive in Baltimore at 10:22PM";     
$Paypalreqnumber0="flight 111";     
$Paypalreqnumber1="flight 222";     
$Paypalreqqty0="q1 12";     
$Paypalreqqty1="q2 12";     
$PayPalselleremail0="XXXXX@paypal.com";        
$PayPalselleremail1="YYYY@paypal.com";     
$paymentAmount0="200"; 
$paymentAmount1="100"; 
$paymentType0="order111"; 
$paymentType1="order222";    
$PayPalCurrencyCode0="USD";     
$PayPalCurrencyCode1="USD";      
$nvpstr="&PAYMENTREQUEST_0_AMT=". urlencode("$paymentAmount0");  
$nvpstr = $nvpstr . "&PAYMENTREQUEST_0_PAYMENTACTION=" . urlencode("$paymentType0");
$nvpstr = $nvpstr . "&PAYMENTREQUEST_0_CURRENCYCODE=" . urlencode("$PayPalCurrencyCode0");   
$nvpstr = $nvpstr . "&PAYMENTREQUEST_0_DESC=" . urlencode("$PayPalitem0_desc");  
$nvpstr = $nvpstr . "&PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID=" . urlencode("$PayPalselleremail0");  
$nvpstr = $nvpstr . "&L_PAYMENTREQUEST_0_NAME0=" . urlencode("$Paypalreqname0");     
$nvpstr = $nvpstr . "&L_PAYMENTREQUEST_0_NUMBER0=" . urlencode("$Paypalreqnumber0");    
$nvpstr = $nvpstr . "&L_PAYMENTREQUEST_0_QTY0=" . urlencode("$Paypalreqqty0");  
// append the plan id      
$nvpstr="&PAYMENTREQUEST_1_AMT=". urlencode("$paymentAmount1");   
$nvpstr = $nvpstr . "&PAYMENTREQUEST_1_PAYMENTACTION=" . urlencode("$paymentType1");
$nvpstr = $nvpstr . "&PAYMENTREQUEST_1_CURRENCYCODE=" . urlencode("$PayPalCurrencyCode1");   
$nvpstr = $nvpstr . "&PAYMENTREQUEST_1_DESC=" . urlencode("$PayPalitem1_desc");  
$nvpstr = $nvpstr . "&PAYMENTREQUEST_1_SELLERPAYPALACCOUNTID=" . urlencode("$PayPalselleremail1");  
$nvpstr = $nvpstr . "&L_PAYMENTREQUEST_1_NAME0=" . urlencode("$Paypalreqname1");     
$nvpstr = $nvpstr . "&L_PAYMENTREQUEST_1_NUMBER0=" . urlencode("$Paypalreqnumber1");    
$nvpstr = $nvpstr . "&L_PAYMENTREQUEST_1_QTY0=" . urlencode("$Paypalreqqty1");  
$solutype="Sole";          
$landpage="Billing";    
$PayPalReturnURL .='?p='.$_SESSION['PLAN']; 
$nvpstr = $nvpstr . "&SOLUTIONTYPE=" . urlencode("$solutype");
$nvpstr = $nvpstr . "&LANDINGPAGE=" . urlencode("$landpage");  
$nvpstr = $nvpstr . "&RETURNURL=" . urlencode("$PayPalReturnURL");
$nvpstr = $nvpstr . "&CANCELURL=" . urlencode("$PayPalCancelURL");
//----------------------------------
// Create Recurring Payment in SetEC          
//  L_PAYMENTREQUEST_n_NUMBERm   L_PAYMENTREQUEST_n_NUMBERm
$billingtype='RecurringPayments';       
$nvpstr = $nvpstr . "&L_PAYMENTREQUEST_n_NUMBER0=" . urlencode($get_iemids);   
$nvpstr = $nvpstr . "&DESC=" . urlencode($padata["desc"]);  
$nvpstr = $nvpstr . "&L_BILLINGTYPE0=" . urlencode("$billingtype");
$nvpstr = $nvpstr . "&L_BILLINGAGREEMENTDESCRIPTION0=" . urlencode($padata["desc"]);    

showing error msg:
SetExpressCheckout API call failed.Array ( [name] => Basic Plan [desc] => Basic Plan $3.00 Signup & $5.00 per month [qty] => 1 [amt] => 300 )
Detailed Error Message: The totals of the cart item amounts do not match order amounts.
Short Error Message: Transaction refused because of an invalid argument. See additional error messages for details.
Error Code: 10413
Error Severity Code: Error

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.