Received a notice in the dblog type: commerce_payflow

Payflow server response:
Array
(
[RESULT] => 7
[SECURETOKENID] => 5294752ce487a898240547
[RESPMSG] => Field format error: Request is too large to process
)

I am running the latest Commerce Kickstart install on a fresh site. This message was apparently triggered when a customer tried to checkout with 10 line-items in the cart. Ran some tests, and found out that quantity does not matter, it's the number of line-items present in the cart: 9 items works, 10 does not. Customer is prevented from going to the Payment page, and is given an error on the review page: "there are errors on the page: communication with paypal failed...".

I could not find any documentation on this, save for an obscure thread in moocommerce. I believe the limit Paypal sets is 99 items per checkout, but I have not found any solid evidence of that either.

Any ideas/help would be much appreciated, thanks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

zooter626’s picture

Assigned: zooter626 » Unassigned
gpbarga’s picture

Hi,

I am also receiving this exact problem, do you know or have seen anything that you've tried to get this work?

thanks,
-gb

Solthun’s picture

I am having the same issue on a site that has been up and running for a while.
I found only a few other mentions online for this problem and all of the recent.
Even though this issue is old, the latest comment is also recent,
so the most probable answer seems to be that paypal altered
something in their API in the last month and only large orders
with multiple line items get this issue so it may not be very common.

Sorry to not provide an answer, but we'll continue looking into this,
maybe contact paypal if needed.

capellic’s picture

I too am having this problem. I have a stuck order with 27 line items.

capellic’s picture

Did some additional research and discovered that the number of line items isn't what triggers the error, it's the total size of the payload being sent to PayPal. I got to thinking this when @zooter626 reported that 10 items triggered the error but I could get to 15 before I triggered the error. I found this Stack Overflow (http://stackoverflow.com/questions/39480168/field-format-error-request-i...) issue that suggested that the CURLOPT_POSTFIELDS is too long for what PayPal will accept.

I can't find anything in PayPal's documentation that indicates any sort of payload limitation.

capellic’s picture

Status: Active » Needs review
FileSize
1.89 KB

The attached patch adds a checkbox to the Payment Method page that allows us to omit the itemized list (line items).

tophneal’s picture

A site I work on was having this same issue, and after applying the patch above, a LOT of the errors stopped. However some still do come through. Upon inspecting the logs, it appears that the excess information is still being sent to PayPal.

Here's two associated logs, with any personal info removed:

Array
(
    [CREATESECURETOKEN] => Y
    [SECURETOKENID] => *REDACTED*
    [TRXTYPE] => A
    [AMT] => 292.16
    [CURRENCY] => USD
    [INVNUM] => *REDACTED*
    [BILLTOEMAIL] => *REDACTED*
    [BILLTOFIRSTNAME] => *REDACTED*
    [BILLTOLASTNAME] => *REDACTED*
    [BILLTOSTREET] => *REDACTED*
    [BILLTOCITY] => *REDACTED*
    [BILLTOSTATE] => *REDACTED*
    [BILLTOCOUNTRY] => *REDACTED*
    [BILLTOZIP] => *REDACTED*
    [BUTTONSOURCE] => CommerceGuys_Cart_PPA
    [ERRORURL] => *REDACTED*/checkout/118164/payment/return/6cBrs8HmU9YfWnHDjFnAm5h7SeQwuhdViOIXwb_KinM
    [RETURNURL] => *REDACTED*/checkout/118164/payment/return/6cBrs8HmU9YfWnHDjFnAm5h7SeQwuhdViOIXwb_KinM
    [CANCELURL] => *REDACTED*/checkout/118164/payment/back/6cBrs8HmU9YfWnHDjFnAm5h7SeQwuhdViOIXwb_KinM
    [DISABLERECEIPT] => TRUE
    [TEMPLATE] => MINLAYOUT
    [CSCREQUIRED] => TRUE
    [CSCEDIT] => TRUE
    [URLMETHOD] => POST
    [USER1] => *REDACTED*
    [SHIPTOFIRSTNAME] => *REDACTED*
    [SHIPTOLASTNAME] => *REDACTED*
    [SHIPTOSTREET] => *REDACTED*
    [SHIPTOCITY] => *REDACTED*
    [SHIPTOSTATE] => *REDACTED*
    [SHIPTOCOUNTRY] => *REDACTED*
    [SHIPTOZIP] => 38606-5733
    [L_NAME0] => Monarda Blue Stocking - 3.5 Inch Pot - 1 Plant
    [L_COST0] => 6.95
    [L_QTY0] => 1
    [L_SKU0] => P MON BLU STO-1
    [L_NAME1] => Bloomerang Purple Reblooming Lilac - Quart - 1 Plant
    [L_COST1] => 12.97
    [L_QTY1] => 1
    [L_SKU1] => LIL SYR BLO QT-1
    [L_NAME2] => Royal Red Buddleia - 4 Inch Pot - 1 Plant
    [L_COST2] => 6.95
    [L_QTY2] => 3
    [L_SKU2] => BUD RO RE-1
    [L_NAME3] => Japanese Maple Tamukeyama - Gallon - 1 Plant
    [L_COST3] => 39.95
    [L_QTY3] => 1
    [L_SKU3] => MAP JAP TAM-1
    [L_NAME4] => Japanese Maple Coral Bark - Gallon - 1 Plant
    [L_COST4] => 39.95
    [L_QTY4] => 1
    [L_SKU4] => MAP JAP COR-1
    [L_NAME5] => Grace Smoketree - 1 Potted Plant
    [L_COST5] => 19.95
    [L_QTY5] => 1
    [L_SKU5] => SMO GRA 4I-1
    [L_NAME6] => Hibiscus Lucy Tree Form - 1 Plant
    [L_COST6] => 24.95
    [L_QTY6] => 1
    [L_SKU6] => HIB LU-1
    [L_NAME7] => Coreopsis Rising Sun - 3.5 Inch Pot - 1 Plant
    [L_COST7] => 6.95
    [L_QTY7] => 2
    [L_SKU7] => COR RIS SU-1
    [L_NAME8] => Aquilegia Origami Red/White - 3.5 Inch Pot - 1 Plant
    [L_COST8] => 5.95
    [L_QTY8] => 2
    [L_SKU8] => AQI ORI RED 3.5I-1
    [L_NAME9] => Monarda Fire Ball - 3.5 Inch Pot - 1 Plant
    [L_COST9] => 6.95
    [L_QTY9] => 1
    [L_SKU9] => P MON FIR BAL 4-1
    [L_NAME10] => Aquilegia Wild Red Columbine - 3.5 Inch Pot - 1 Plant
    [L_COST10] => 5.95
    [L_QTY10] => 1
    [L_SKU10] => AQI WILD RED 3.5I-1
    [L_NAME11] => Red Sunset Maple - 2.5 Inch Pot - 1 plant
    [L_COST11] => 6.79
    [L_QTY11] => 2
    [L_SKU11] => MAP RSU PT-1
    [L_NAME12] => Kousa Dogwood Tree - Bare Root - 1 plant
    [L_COST12] => 15.95
    [L_QTY12] => 1
    [L_SKU12] => DOG KOU TRA-1
    [L_NAME13] => Shipping and handling Tier 6
    [L_COST13] => 58.36
    [L_QTY13] => 1
    [ITEMAMT] => 292.16
    [TAXAMT] => 0.00
    [PARTNER] => PayPal
    [VENDOR] => *REDACTED*
    [USER] => cartapi
    [PWD] => XXXXXXX
    [MODE] => LIVE
)
Payflow server response:
Array
(
    [RESULT] => 7
    [SECURETOKENID] => *REDACTED*
    [RESPMSG] => Field format error: Request is too large to process
)
andyg5000’s picture

@tophneal I don't think the patch applied for you. Can you try this re-roll?

It looks like the L_NAME[] query string generated for the CURL request becomes too long for PayPal to accept in these situations.

tophneal’s picture

@andyg5000

Thank you for the patch! I just rolled it, but of course I'll have to wait for a large order to be processed. I'll report back if there are still issues.

andyg5000’s picture

Great, just be sure to update the payment settings to omit them too, if you haven't already :)

mglaman’s picture

Version: 7.x-2.2 » 7.x-2.x-dev