Paypal API: los totales de los importes de los artículos del carrito no coinciden con los de los pedidos
Estoy trabajando con la API de pago rápido de PayPal y tengo problemas con la configuración de la cantidad. A continuación se muestran mis parámetros URI:
$params = array(
'METHOD' => 'SetExpressCheckout',
'PAYMENTREQUEST_0_SHIPPINGAMT' => '0',
'PAYMENTREQUEST_0_TAXAMT' => '0',
'PAYMENTREQUEST_0_HANDLINGAMT' => '0',
'PAYMENTREQUEST_0_AMT' => "50.00",
'RETURNURL' => $this->_returnUri,
'CANCELURL' => $this->_cancelUri,
'HDRIMG' => $this->_logoUri,
'PAYMENTREQUEST_0_CURRENCYCODE' => 'GBP',
'L_PAYMENTREQUEST_0_DESC0' => 'Product description',
'L_PAYMENTREQUEST_0_NAME0' => 'Product name',
'L_PAYMENTREQUEST_0_AMT0' => "50.00",
'L_PAYMENTREQUEST_0_QTY0' => "2"
);
Si L_PAYMENTREQUEST_0_QTY0 se establece en 1, el proceso está bien. Sin embargo, cambiarlo a 2 y agregar 'PAYMENTREQUEST_0_ITEMAMT' => "100.00" a la matriz me da el siguiente error:
TIMESTAMP: 2012-04-17T12:11:16Z
CORRELATIONID: da43f6c91254
ACK: Failure
VERSION: 88.0
BUILD: 2808426
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
He intentado durante horas y horas arreglarlo y me he dado por vencido. ¿Alguien puede resaltar lo que necesito hacer para que funcione?