Zen Cart Logo
Forums / Bug Reports / [Done v1.3.9] Linkpoint - problem with coupons in v1.3.8

[Done v1.3.9] Linkpoint - problem with coupons in v1.3.8

Locked

Views: 11,933

Results 1 to 20 of 27
This thread is locked. New replies are disabled.
5 Mar 2008, 5:57 PM
#1
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

[Done v1.3.9] Linkpoint - problem with coupons in v1.3.8

Hi Dr Byte and team,

We recently upgraded to 1.3.8a from 1.3.7. Things are running fine, except we are getting an abnormal amount of customers saying that their credit card is being declined.

I already reupdated the linkpoint files from the build by first uninstalling the module, then reuploading the new 1.3.8a files, and then reinstalling the module. I thought this would fix the problem but it hasn't and people are still complaining.

I went ahead and did a test transaction for a small dollar item and it went through without problems. Likewise, we do see an occassional CC order come through, but we are getting a lot more people saying that it's not.

So do you know of any known issues by any chance? I just went ahead and turned my Linkpoint Debug Mode to "Failure Alert Only" to see what happens, but if you think this should be changed to "Log and Email" for better troubleshooting, let me know.

5 Mar 2008, 6:39 PM
#2
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: [Done v1.3.9] Linkpoint - problem with coupons in v1.3.8

I just got a particular failure and I see this error in the log:

[r_error] => SGS-002301: Charge total must be the sum of subtotal, tax,
value added tax, and shipping.

Any idea what would cause that?

The full log is here:

Response Code:

Sending to Gateway:
result = LIVE
oid = 12801-kWvOOE
ip = 212.28.224.192
ponumber =
subtotal = 290.78
tax = 0
shipping = 57.75
chargetotal = 299.37
cardnumber = ******
cardexpmonth = 07
cardexpyear = 08
cvmindicator = provided
cvmvalue = ******
userid = 3409
customerid = 3409
name = *****
company =
address1 = street espace ****,building *****
address2 =
city = Zouk ****, ****, 0000
state = Zouk ****, Lebanon
country = LB
phone = ***************
email = *******@hotmail.com
addrnum = ***********
zip = 0000
sname = ********
saddress1 = ********
saddress2 =
scity = Zouk ******
sstate = Zouk **********
szip = 0000
scountry = LB
comments = Website Order
items = Array
(
[0] => Array
(
[id] => 3170
[description] => Ash Pen Pro by Magic Dream
[quantity] => 1
[price] => 11.59
)

[1] => Array
    (
        [id] => 1648
        [description] => Flash Cord
        [quantity] => 1
        [price] => 11.59
    )

[2] => Array
    (
        [id] => 3595
        [description] => Seo Paper Streamer (white) by Seo Magic
        [quantity] => 1
        [price] => 43.65
    )

[3] => Array
    (
        [id] => 3620
        [description] => Parasol Anywhere by Joker Lam
        [quantity] => 1
        [price] => 43.60
    )

[4] => Array
    (
        [id] => 3619
        [description] => Parasol Box Set (7 Parasols)
        [quantity] => 1
        [price] => 67.90
    )

[5] => Array
    (
        [id] => 686
        [description] => Flash Cotton by Fantastic Flash
        [quantity] => 1
        [price] => 6.79
    )

[6] => Array
    (
        [id] => 685
        [description] => Flash Pads by Fantastic Flash
        [quantity] => 1
        [price] => 4.85
    )

[7] => Array
    (
        [id] => 1643
        [description] => Flash Powder White A&B
        [quantity] => 1
        [price] => 10.67
    )

[8] => Array
    (
        [id] => 683
        [description] => Flash String by Fantastic Flash
        [quantity] => 1
        [price] => 12.61
    )

[9] => Array
    (
        [id] => 54
        [description] => D'Lite Pair - Red
        [quantity] => 1
        [price] => 19.39
    )

[10] => Array
    (
        [id] => 1513
        [description] => Silk Streamers from Italy - 4" x 3 met.
        [quantity] => 1
        [price] => 7.75
    )

[11] => Array
    (
        [id] => 4045
        [description] => Electric Deck Bicycle - Red
        [quantity] => 1
        [price] => 14.50
    )

[12] => Array
    (
        [id] => 3256
        [description] => Card Castle by Uday (Normal Size cards)
        [quantity] => 1
        [price] => 19.40
    )

[13] => Array
    (
        [id] => 3096
        [description] => 12'' Silk - 12-pack (Assorted)
        [quantity] => 1
        [price] => 16.49
    )

)

ordertype = PREAUTH
host = secure.linkpt.net
port = 1129
keyfile = *****.pem
configfile = 1018371
transactionorigin = ECI
terminaltype = UNSPECIFIED

Result:
(
[r_csp] =>
[r_time] => Wed Mar 5 11:31:13 2008
[r_ref] =>
[r_error] => SGS-002301: Charge total must be the sum of subtotal, tax,
value added tax, and shipping.
[r_ordernum] => 12801-kWvOOE
[r_message] =>
[r_code] =>
[r_tdate] =>
[r_score] =>
[r_authresponse] =>
[r_approved] =>
[r_avs] =>
)

Moderator note: private data obscured

5 Mar 2008, 6:46 PM
#3
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: [Done v1.3.9] Linkpoint - problem with coupons in v1.3.8

Keep in mind that the customer above has a gift certificate CREDIT of $20.08 that I believe he was trying to apply. We also have another discount code that would take percentages off the entire order.

5 Mar 2008, 6:49 PM
#4
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,616
Plugin Contributions:
0

Re: [Done v1.3.9] Linkpoint - problem with coupons in v1.3.8

Jeff-

What were the numbers on the Order Confirmation?

5 Mar 2008, 6:54 PM
#5
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: [Done v1.3.9] Linkpoint - problem with coupons in v1.3.8

I did see that you had a Linkpoint_api fix for the Low Order Fee module. I wasn't using that module, but I looked and for some reason, it was enabled in my config. So I disabled it AND installed your updated Linkpoint_api file.

I didn't make any edits to it though, even though I am using other OT_ modules (ot_coupon, ot_gv, etc)

If you think I need to edit to accommodate those, please let me know.

5 Mar 2008, 6:58 PM
#6
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: [Done v1.3.9] Linkpoint - problem with coupons in v1.3.8

Kim....nothing for that transaction came through in Linkpoint......In other words, the transaction never went through to authorize or fail. All I got was that Failure Alert email.

5 Mar 2008, 7:09 PM
#8
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: [Done v1.3.9] Linkpoint - problem with coupons in v1.3.8

Dr Byte....

I just put in the first suggestion:

$myorder["shipping"] = ($order->info['shipping_cost'] == 'f') ? 0 : $order->info['shipping_cost'];

I had already did the second suggestion prior to the upgrade, so that didn't change. I will have the customer try to resubmit and report the findings.

5 Mar 2008, 7:20 PM
#9
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: [Done v1.3.9] Linkpoint - problem with coupons in v1.3.8

Still failing with the same error:

[r_error] => SGS-002301: Charge total must be the sum of subtotal, tax,
value added tax, and shipping.

I think this must have something to do with using gift certificates AND/OR Coupons.

Edit: This also appears to be happening with others:
http://zen-cart.com/forum/showthread.php?t=88813&highlight=SGS-002301
http://zen-cart.com/forum/showthread.php?t=87901&highlight=SGS-002301

5 Mar 2008, 7:39 PM
#10
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: [Done v1.3.9] Linkpoint - problem with coupons in v1.3.8

Ok, it's definitely something to do with the OT_COUPON. I just placed a test order. My subtotal page looks like this:

*Qty. Item Name Total
1 x Plastic Wallet for Cards $0.97

Sub-Total: $0.97
United States Postal Service (First-Class Mail (2 - 5 days)): $1.30
Discount Coupon/Lifetime 10% Discount Code: *****: -$0.10
TOTAL: $2.17

Then when I go to confirm the transaction, I get the following messages:

*- Success Congratulations you have redeemed the Discount Coupon

  • Error Subtotal miscalculation. Please notify the storeowner.
    SGS-002301: Charge total must be the sum of subtotal, tax, value added tax, and shipping.
  • Warning Your card has been declined. Please re-enter your card information, try another card, or contact the store owner for assistance.*

Finally, my response code from the transaction:

Response Code:

Sending to Gateway:
result = LIVE
oid = 12802-m1xpUj
ip = 69.225.40.144
ponumber =
subtotal = 0.97
tax = 0
shipping = 1.3
chargetotal = 2.17
cardnumber = ******
cardexpmonth = 05
cardexpyear = 08
cvmindicator = provided
cvmvalue = ******
userid = 3
customerid = 3
name = ************
company =
address1 = ********* Road
address2 =
city = Wellfleet
state = Massachusetts
country = US
phone = 209--*
email = ****@gmail.com
addrnum = ********** Road
zip = 02667
sname = *
saddress1 = ****** Road
saddress2 =
scity = Wellfleet
sstate = Massachusetts
szip = 02667
scountry = US
comments = Website Order
items = Array
(
[1] => Array
(
[id] => 1881
[description] => Plastic Wallet for Cards
[quantity] => 1
[price] => 0.97
)

)

ordertype = PREAUTH
host = secure.linkpt.net
port = 1129
keyfile = *****.pem
configfile = 1018371
transactionorigin = ECI
terminaltype = UNSPECIFIED

Result:
(
[r_csp] =>
[r_time] => Wed Mar 5 12:35:23 2008
[r_ref] =>
[r_error] => SGS-002301: Charge total must be the sum of subtotal, tax,
value added tax, and shipping.
[r_ordernum] => 12802-m1xpUj
[r_message] =>
[r_code] =>
[r_tdate] =>
[r_score] =>
[r_authresponse] =>
[r_approved] =>
[r_avs] =>
)

5 Mar 2008, 9:27 PM
#11
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: [Done v1.3.9] Linkpoint - problem with coupons in v1.3.8

So what's happening is that the chargetotal variable is correct......that is the amount we want to charge. But when you add up the subtotal, tax, and shipping, it doesn't factor in the MISSING AMOUNT deducted because of the ot_coupon.

We need to have the api modified so that the chargetotal amount doesn't have to equal subtotal+shipping + tax. Either that, or the subtotal+shipping+tax needs to factor in the ot_coupon discount before doing the comparison.

6 Mar 2008, 8:52 AM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [Done v1.3.9] Linkpoint - problem with coupons in v1.3.8

More correctly, it's necessary to skip sending the subtotal if there are discounts involved.

I've attached updated code to deal with the issue described, as well as handle other order-total discrepancies more efficiently.

(Note: this fix ALSO includes the ot_loworderfee fix posted previously, and thus supercedes the previous fix)

NOTE: linkpoint_api-138-march06-2008.zip ATTACHMENT REPLACED BELOW ... see later post:
http://www.zen-cart.com/forum/showthread.php?p=520462#post520462

6 Mar 2008, 3:38 PM
#13
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: [Done v1.3.9] Linkpoint - problem with coupons in v1.3.8

DrByte -

Good news and bad news. (First off, thanks for getting on top of this!)

The good news is that it works for discount coupons. I placed a test order and it went through like a charm!

The bad news is that if a transaction uses the ot_gv (gift certificate), it gives the same error:

Subtotal miscalculation. Please notify the storeowner.
SGS-002301: Invalid subtotal.

So here is where we stand:

Purchase w/ Coupon ONLY - WORKS
Purchase w/ GV ONLY - NO
Purchase w/GV & Coupon - NO

6 Mar 2008, 9:50 PM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [Done v1.3.9] Linkpoint - problem with coupons in v1.3.8

Jeff_Mash:

The bad news is that if a transaction uses the ot_gv (gift certificate), it gives the same error:

Subtotal miscalculation. Please notify the storeowner.
SGS-002301: Invalid subtotal.

So here is where we stand:

Purchase w/ Coupon ONLY - WORKS
Purchase w/ GV ONLY - NO
Purchase w/GV & Coupon - NO
I'm not able to replicate this problem using the same code.

6 Mar 2008, 11:00 PM
#15
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: [Done v1.3.9] Linkpoint - problem with coupons in v1.3.8

Is there any sort of log or php file you would need me to post in order to help troubleshoot this?

NOTE: I didn't uninstall/reinstall the module the last time I replaced the linkpoint_api.php file because I didn't think I needed to. If that is a prerequisite, let me know and I can do that.

The way I originally did my test is I had an item that was $3.00, then applied a $1.00 balance from my gift certificate, and proceeded to the checkout. I didn't use any coupons, just the store credit leaving a remainder of $1.00. That failed with the error. If need be, I can post the linkpoint log or any other file.

7 Mar 2008, 3:58 AM
#16
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: [Done v1.3.9] Linkpoint - problem with coupons in v1.3.8

DrByte - THANK YOU for the help. For whatever reason, after I did an uninstall and reinstall of the linkpoint_api module, things worked for gift certificates as well as coupons.

You've been a great help to me, and I can't thank you enough.

7 Mar 2008, 4:30 AM
#17
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done v1.3.9] Linkpoint - problem with coupons in v1.3.8

/me hums along to DrByte Rulez da World ... :onfire: :onfire: :onfire:

7 Mar 2008, 5:11 AM
#18
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [Done v1.3.9] Linkpoint - problem with coupons in v1.3.8

Phew! I was having trouble thinking of what else could be wrong!

7 Mar 2008, 5:36 AM
#19
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [Done v1.3.9] Linkpoint - problem with coupons in v1.3.8

Another update, to include the free-shipping fix from a previous thread:
http://www.zen-cart.com/forum/showthread.php?t=87388

*Updated module attached, which includes:

  • ot_loworderfee fix
  • coupon, gv fix
  • free shipping fix*

NOTE: Use the updated module found at this link: http://www.zen-cart.com/forum/showthread.php?p=563490#post563490

The file formerly attached here is now outdated.

9 Mar 2008, 5:11 AM
#20
bogie avatar

bogie

Zen Follower

Join Date:
Feb 2008
Posts:
132
Plugin Contributions:
0

Re: [Done v1.3.9] Linkpoint - problem with coupons in v1.3.8

Hey, thanks - I was getting rejected from linkpoint when buyers would buy enough that they'd kick SWGuy's quantity discount mod into action... This fixed that.