PDA

View Full Version : Coupons not reflected in Paypal



jxyz37
10-03-2008, 07:21 AM
Hi,
Our usual webmaster is on vacation now, so I've been trying to figure out the shopping cart...
People had been complaining that a coupon was showing up as expired. I fixed that problem in the admin section so it seems like it's going through. However, Paypal still charges them as if they did not use a coupon. The coupons did work before the expiration issue.
Thanks!

michael_s
10-03-2008, 08:23 AM
Paypal module must be in Aggregate mode, not Per Item in order for coupon to be passed correctly.

dknowle
04-23-2009, 05:26 AM
I'm having the same problem running oscmax 2.0.0 w/ the 'Credit/Debit Card (via PayPal) PayPal IPN v2.3.3' module. The total passed to PayPal never includes the discount, whether it is in aggregate or per item mode.

However, when I use the 'PayPal Website Payments Standard v1.0', I get the correct total passed to PayPal.

Anyone have any ideas as to what is possibly going on with the PayPal IPN v2.3.3 module?

thanks!

wkdwich
06-16-2009, 06:16 PM
I'm having the same issue New install of 2.0.2 with an upgraded DB.. when I use this module it does not deduct the coupon Aggrigate is set True as defualt. The PayPal Website Standard" does not show as a payment option when it is set to TRUE

wkdwich
06-24-2009, 04:32 AM
Anyone?? I have gone over and over the paypal settings, the module settings and still the coupons are not reflected when moving to paypal site for the payment..

Can someone who is successfully getting the cpupons to work detail out their paypal settings and module settings??
thanks

fourmat
07-08-2009, 06:43 AM
Over at the mothership, there is a paypal IPN contribution that is supposed to handle the CCGV mod properly. Has anyone tried this?

I am running into the same problem as everyone else....

osCommerce Community Add-Ons (http://addons.oscommerce.com/info/6775)

michael_s
07-08-2009, 08:14 AM
Yes that updated mod fixes the issue. I just tested it, and it properly carries the coupon/voucher totals through the entire paypal process.

fourmat
07-08-2009, 11:34 AM
Great! I have installed the fix and can confirm that it works on my installation. Thanks!

wkdwich
07-08-2009, 12:23 PM
Great news I will do the same sometime tonight and report in

fourmat
07-08-2009, 12:32 PM
If you get a chance, I posted another problem I found with the CCGV module in the main forum, not paypal related though. Take a look and see if you find a problem trying to apply a fixed coupon of greater value than the total...I had some wierd numbers pop up, and haven't tracked down the calculations that created them yet...

wkdwich
07-08-2009, 06:26 PM
confirmed.. this change did the trick for me also.. thanks for finally squaring htis away Michael.. will it be updated in the total package also??

michael_s
07-08-2009, 09:08 PM
It is already updated in SVN for the upcoming v2.1 release.

fourmat
07-12-2009, 06:20 AM
I might have found another issue with the new paypal IPN module. I'm getting orders that come through the order confirmation OK, but the shipping is getting charged twice on the paypal side with no indication on the shopping cart side.

Anyone else seeing this issue?

I've had to totally disable the paypal option until I can figure this out.

wkdwich
07-12-2009, 07:17 AM
is it every order?? The store I did set it up at is not active yet.. well it's live but no promotion so its just got no real activity yet..

fourmat
07-12-2009, 07:26 AM
On every paypal order yes. When I initially tested it, I had just tested with a $0 shipping (Store Pickup) and a coupon. I didn't check with a shipping amount greater than 0.

Feels a little like playing whack-a-mole....

Can you place a test order to see if you see an issue?

wkdwich
07-12-2009, 02:20 PM
sure private me your website

fourmat
07-12-2009, 04:09 PM
actually I was wondering if you could place and order with your web site as a test to see if you came up with the same result. I know mine is repeatable...

fourmat
07-13-2009, 12:32 PM
OK, I definitely found an issue with the Paypal + CCGV module. On lines 462 and 466 of the paypal_ipn.php file there is an additional + $shipping item that wasn't in the v2.3.3 file.

I removed those additions and placed a test order and it no longer passes a duplicate shipping charge to paypal.

Change line 462 from:

$parameters['amount'] = number_format(($subtotal + $order->info['tax'] + $shipping) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));

to:

$parameters['amount'] = number_format(($subtotal + $order->info['tax']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));

Change line 466 from:

$parameters['amount'] = number_format(($subtotal + $shipping) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));

to:

$parameters['amount'] = number_format(($subtotal) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));


Hope this helps.

wkdwich
07-13-2009, 12:58 PM
I dunno fourmat.. I just tested my cart and the proper shipping was sent over.. what shipping method are you using? This cart only uses table rates (it is books)

I see from your changes where yes it might be doing the shipping twice.. but not on mine.. so I will hang onto this info for the time being

fourmat
07-15-2009, 05:41 AM
I'm using UPSXML, USPS, Local Delivery, and 3rd Party. But for testing I use UPSXML as that's the most popular method to ship. Maybe it has to do with the sort order on the order total module. Here's what I have:

Cash on Delivery Fee 5
Discount Coupons 2
Gift Vouchers 740
Shipping 4
Sub-Total 1
Tax 3
Total 800

This order has been about the only way I've been able to get everything working properly. Maybe this has something to do with it...

wkdwich
07-15-2009, 06:49 AM
the order of things looks good to me..

erwindr
07-29-2009, 02:45 PM
Found a problem with the PayPal IPN for CCGV.

When I hit the refresh button in the order confirmation screen (the last screen before being sent to PayPal) the shipping charge is not being refreshed properly: Only the first digit shows up. So a 80.- shipping shows up as 8.-

Refreshing the page when any other payment method is selected doesn't give the error.

I know refreshing the page at that stage doesn't make real sense but our customers do a lot of stuff on our website that I would never think of! ;-)

Regards,
Erwin

fourmat
07-29-2009, 04:44 PM
I can confirm this problem. I have only seen it when someone goes to paypal, then returns to the cart for some reason without processing the payment. It changes the shipping label to the first digit in the cost of the shipping, like if the original cost is $6.35, the shipping method label will be 6. and the cost of the shipping will be $6.00 on the return or refresh. Have not found the reason yet...

fourmat
09-14-2009, 01:03 PM
OK, I think I worked out the problem with the shipping not being returned from paypal. This isn't really a fix so much as it is a work around. For some reason the data being returned from Paypal through the paypal_ipn.php file had a hiccup. Instead of sending the return back to the checkout_payment.php page, I have it sending back to the checkout_shipping.php page, forcing the shipping charges to be recalculated. To do this, edit the paypal_ipn.php module file, and change the following from:

$parameters['cancel_return'] = tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL');

to:

$parameters['cancel_return'] = tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL');

I have tested this both with and without a coupon, and it seems to work both ways.