Estoy trabajando con la API de pago exprés de PayPal y tengo problemas para establecer la cantidad. A continuación son mis parámetros URI:API de Paypal: los totales de los montos de los artículos del carrito no coinciden con los importes de los pedidos
$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, cambiándolo a 2 y añadiendo '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 tratado durante horas para arreglarlo y he dado por vencido. ¿Alguien puede resaltar lo que necesito hacer para que funcione?
¿Ha intentado hacer 'L_PAYMENTREQUEST_0_QTY0 = 2' 'y 'L_PAYMENTREQUEST_0_AMT0 '=> "100.00" 'while'' PAYMENTREQUEST_0_AMT '=> "100.00" '? Tal vez PayPal no calcule el 2x50.00, pero solo busca TOTAL por LÍNEA. Solo estoy haciendo suposiciones aquí. – Jakub
Por desgracia, eso no funcionó. – Rijndael
no sé si ayudaría, pero tal vez todos sus valores en dólares debe ser formateado correctamente '0.00' – thescientist