Search code examples
paypalexpress-checkout

Single item with different amount(Buy One Get One Free)


I have an item which says buy one and get one free.the amount of the single item is 7.99 so when customer select 2 items then we are dividing amount of the item to number of quantities so here what happens is each item costs 3.995 when I am sending this amount to paypal with quantity =2 then paypal is not accepting the amount since it has 3 digits after decimal point so now I am changing the amount to 3.99 and 4.00 but I am not able to send this to paypal since we are sending the single value of the amount with the no of quantities(i,e &L_PAYMENTREQUEST_0_AMT0=3.99&L_PAYMENTREQUEST_0_QTY0=2).Please guide me how to send two different amount for same item.


Solution

  • I would treat it like a discount. Add the regular price for the qty of items, but then add an additional line item called "discount" that has a negative amount reflecting the amount they should be saving. That way the math will work out correctly and you won't get that cart item pricing error back from PayPal.