PDA

View Full Version : Problem with PayPal Shopping Cart...


Mike in utah
7-23-05, 09:22 PM
Okay, I need your help!

I have written my own shopping cart and I use Paypal to process it. I do this by sending each item to them thru hidden fields. This works fine but now I have discovered a little problem with having a “coupon” to get something free if one buys other items. At first I thought this programming was going to be easy since I could just add a line item that had a negative cost with it. Well…Paypal won’t accept negative numbers! To make it even harder, they won’t even accept zero as a price. I know I could discount each line item price to equal the discount but people just don’t understand this…they want to see the word “FREE” on something. Does anybody have a suggestion(s) on how I might “program around” this problem?

Thanks!

Mike

IanS
7-24-05, 05:40 AM
I don't run an commerce site, but surely you should only be submitting to PayPal the final amount that you're expecting the customer to pay. Submission of an amount to PayPal should surely be the last part of the operation, having collected the full shopping cart and shipping address. As long as the value is above $0.01 (or whatever their minimum transaction size is) then PayPal need to be involved, if you sending out something totally free then bypass the PayPal section.

Mike in utah
7-24-05, 12:50 PM
Ian,

Thanks for the response!

Yeah, simple one would think...

If one has a 3rd party cart (which is what mine would be) then each item is passed to them with the price and quantity - they do the math! So unless I put everything into one item I can't pass the total amount of the cart to them, which is not practical on a cart with many different items.

PayPal could make it simple by having a hidden variable that holds an amount that is taken off the total, which could be used for credits, coupons, etc. Since price reductions, discounts, free items, etc. have been part of commerce since beginning of time one would think that PayPal would have something like that.

I'm hoping that there is a solution to this that I just missed or maybe PayPal just wants every little cent they can get.

Mike