 | |  | | | Classifieds Bug Reports Post any problems you may be having with Classifieds here. |
November 9th, 2009, 09:22 PM
|
#1 (permalink)
| | Member Verified Customer
Join Date: Oct 2009
Posts: 111
| Paypal error on quantity=2 Code: Content visible to verified customers only.
look at the top... it shows correct:
quantity of 2, at $9.95
total shows 21.90 (2 x $9.95 + $2.00 shipping each)
now look at the PayPal form.
amount shows 21.90, but quantity shows 2, so when the guy goes to paypal, it wants 43.80
Plus... look at shipping in the Paypal vars... it shows 0... shouldn't it be showing $2 ??
????
btw: totals are correct if quantity is 1
(shipping is still zero though in the paypal vars)
in buy.php at line 70:
if ( $checkbuy > 1 ) $adamount = $price * $checkbuy;
comment that line out and the paypal vars (and totals when he gets to PayPal) are correct.
.
Last edited by ktmtalk; November 9th, 2009 at 09:40 PM.
|
| |
November 10th, 2009, 05:19 AM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,698
|
No we cant pass shipping to paypal we tried that before it never showed up in paypal.
Actually since for some reason shipping never could get passed we had to pass the amount as a total to paypal would be in your buy template file set quantity to 1. do not use a variable.
|
| |
November 10th, 2009, 09:29 AM
|
#3 (permalink)
| | Member Verified Customer
Join Date: Oct 2009
Posts: 111
| Quote:
Originally Posted by Chuck S No we cant pass shipping to paypal we tried that before it never showed up in paypal.
Actually since for some reason shipping never could get passed we had to pass the amount as a total to paypal would be in your buy template file set quantity to 1. do not use a variable. | i fixed the code and it's passing shiping to paypal fine... did everything in the buy.tmpl file
Last edited by ktmtalk; November 10th, 2009 at 10:28 AM.
|
| |
November 10th, 2009, 09:40 AM
|
#4 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,698
|
what did you do to fix it?
Last time I investigated paypal I beleive users have to have shipping as an active field in paypal settings to pass thats which is why we pass the full charge to paypal.
If there is something different then I can simply alter the template accoringly to put the regular ad amount in the template and quantity etc and let paypal do the math.
Your post earlier made me remember why shipping does not work. At least thats my recollection of past attempts although its been awhile.
You mean the buy template by the way.
|
| |
November 10th, 2009, 10:00 AM
|
#5 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,698
|
I looked at your buy template Code: Content visible to verified customers only.
All your doing is formatting a display to the user in a different way showing prices which is your perogative on how you want to display things. But your passing shipping as 0 to paypal which goes back to what I have already talked about. I thought you had found out another way to pass shipping  . If we want to keep quantity passed to paypal thats fine then basically the whole thing comes down to this line gets negated Code: Content visible to verified customers only.
Then the bid template would simply be this with one alteration on this line in bold. Basically all that does is tells the user much like yours add an up of costs. Code: Content visible to verified customers only.
That basically tells a user your buying x quantity at x cost plus x shipping amount
|
| |
November 10th, 2009, 10:23 AM
|
#6 (permalink)
| | Member Verified Customer
Join Date: Oct 2009
Posts: 111
|
shipping is NOT being passed as zero. It is passing the exact value of whatever was in the shipping field. Code: Content visible to verified customers only.
In buy.php: Code: Content visible to verified customers only.
and here is a resulting tmpl from a transaction - shipping = $1, price of item=$9.95, quantity=3
Notice that all Paypal variables are correct. Code: Content visible to verified customers only.
|
| |
November 10th, 2009, 10:25 AM
|
#7 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,698
|
Tell me this. Do you in your paypal setup have shipping as an active field in your setup in paypal?
|
| |
November 10th, 2009, 10:26 AM
|
#8 (permalink)
| | Member Verified Customer
Join Date: Oct 2009
Posts: 111
|
here is the same one, with shipping changed to $1.50
again notice, all paypal variables are set and correct. Code: Content visible to verified customers only.
|
| |
November 10th, 2009, 10:31 AM
|
#9 (permalink)
| | Member Verified Customer
Join Date: Oct 2009
Posts: 111
| Quote:
Originally Posted by Chuck S Tell me this. Do you in your paypal setup have shipping as an active field in your setup in paypal? | no. I use that same paypal for lots of different things so it is 100% generic - no special fields, no required fields.
|
| |
November 10th, 2009, 10:37 AM
|
#10 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,698
|
I only saw your line where you set totalshipping to 0
Basically the only change needed really is those two lines you commented out just make what I have below. Ad amount is left at the price. shipping amount will be passed in quantity amount if there is one and quantity is passed. The template change I noted was more of a beautification thing like alot of your coding did with one small exception. You choose to do your calculations in the php file and alot of them are is different way of wording things. The only core change needed to pass things to the current template to work correctly is this after removing the two lines in buy.php you noted. Code: Content visible to verified customers only.
The default template works fine with just that one simple change to the buy.php file
But it till brings me back to my thoughts on when we initially coded this with paypal a ways ago it was done the reason it was done for a reason and thats because the shipping did not get passed. Shipping was always 0 when it went to paypal even though if we viewed the contents of our template the amount was in there. Maybe paypal has changed but I seem to remember there was a switch where a user had to elect whether to use shipping or not in there paypal setup. Hense it was coded the way it was so it would work for everyone. If paypal has changed things and shipping works for all then thats great news.
|
| |
November 10th, 2009, 10:38 AM
|
#11 (permalink)
| | Member Verified Customer
Join Date: Oct 2009
Posts: 111
|
another one from another seller
quantity=2, price=$150, shipping = $12 each,
and again, all paypal variables set and correct Code: Content visible to verified customers only.
|
| |
November 10th, 2009, 10:41 AM
|
#12 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,698
|
I already responded my friend. |
| |
November 10th, 2009, 10:43 AM
|
#13 (permalink)
| | Member Verified Customer
Join Date: Oct 2009
Posts: 111
| Quote:
Originally Posted by Chuck S Maybe paypal has changed but I seem to remember there was a switch where a user had to elect whether to use shipping or not in there paypal setup. Hense it was coded the way it was so it would work for everyone. If paypal has changed things and shipping works for all then thats great news. | hmmmm... you could be right... I'll watch it for a while and if I get a complaint, I'll probably change it back to just multiplying everything out and passing the total like you originally did.
|
| |
November 10th, 2009, 10:44 AM
|
#14 (permalink)
| | Member Verified Customer
Join Date: Oct 2009
Posts: 111
| Quote:
Originally Posted by Chuck S I already responded my friend.  | I'm a friend !! How cool is that !!!
Actually, I posted that 2nd one in case there was something unique about MY paypal... wanted to see if it also worked the same with someone else's paypal
If you change your buy.php, don't forget to zap that quantity field or ... just hardcode it in the tmpl to "1" else our friends at PayPal will double the amounts when some buys with a quantity > 1
|
| |
November 10th, 2009, 10:49 AM
|
#15 (permalink)
| | Member Verified Customer
Join Date: Oct 2009
Posts: 111
|
I continue to be amazed that problems like this (paypal setting quantities and multiplying the totals) has never been reported... it's not like the classifieds system is a new system... it's been around for a while.
|
| |
November 10th, 2009, 10:52 AM
|
#16 (permalink)
| | Member Verified Customer
Join Date: Oct 2009
Posts: 111
|
I sure would like to change that product id that gets sent to Paypal - that long code that gets emailed to the buyer from paypal is confusing to the buyer. Fortunately, the buyer also gets a "message" with the correct links to the item that was purchased.
|
| |
November 10th, 2009, 10:55 AM
|
#17 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,698
|
LOL my friend is a term I use alot. I deal with tons and tons of people daily so cliches are my friend.
Well like I stated way earlier in this discussion I remember there was a specific reason why we passed a total amount to paypal.
I have no problem coding things as I noted in this thread since its real easy. 90% of what your posting is beautification because you want things to say things a certain way. Your $totalshipping line is the only real code needed. My example to buy.php in post 10 does just that. No other changes needed to anything to pass amounts correctly.
You simply swap those two lines you commented out with that one line I posted.
|
| |
November 10th, 2009, 10:57 AM
|
#18 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,698
|
You can not change item_number.
The necessary people get the proper links etc thats assured.
The item_number is strictly an internally used number by paypal that gets passed back to us to the payment_verification.php script so that we can update things accordingly in the script for display etc.
|
| |
November 12th, 2009, 11:10 AM
|
#19 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,698
|
Yep I knew this would bit me in the butt if I tried passing shipping to paypal your way.
Have a user who is already reporting it does not work. Might have to do with the type of paypal account.
Think I might just reword some things like we where talking about but in the end just pass a total number to paypal for payment.
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 10:43 PM. | |