Forum Home Forum Home > Legacy Products > SalesCart Standard / PRO / SQL
  New Posts New Posts RSS Feed - Changing Session("TxtMode")
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum LockedChanging Session("TxtMode")

 Post Reply Post Reply
Author
Message Reverse Sort Order
lleemon View Drop Down
Groupie
Groupie


Joined: March/16/04
Location: United States
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote lleemon Quote  Post ReplyReply Direct Link To This Post Topic: Changing Session("TxtMode")
    Posted: December/10/04 at 1:00pm
Found my issue:

OLD WAY

StrComp(rsAddressInfo.Fields("Address"), rsAdderssInfo.Fields("shipaddress"), 1)


NEW WAY

StrComp(rsAddressInfo.Fields("Address"), rsAddressInfo.Fields("shipaddress"), 1)

Back to Top
lleemon View Drop Down
Groupie
Groupie


Joined: March/16/04
Location: United States
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote lleemon Quote  Post ReplyReply Direct Link To This Post Posted: December/10/04 at 10:17am
Thanks for the quick reponse.

Reason we want to do this is because have had some issues recently with customers that have had different billto info vs shipto info. Sometimes it takes us a few days to get to customers that fall into this category and we do not want to tie up their money if we still have not processed the order(s).

This allows us to authorize the transaction but not take the money out of the account until we confirm a few things.

Maybe the standard for other ecommerce business' is to do AUTH_ONLY but that becomes a lot of work to go back into and capture the transaction manually. With AUTH_CAPTURE it's automatic in the batch each night.

Maybe others have suggestions on ways of doing this. We would be delighted to hear your methods.

Hope this helps in understanding.
Back to Top
Techno Geek View Drop Down
Admin Group
Admin Group
Avatar
Evil monkey living in my closet!

Joined: March/11/04
Location: United States
Status: Offline
Points: 1206
Post Options Post Options   Thanks (0) Thanks(0)   Quote Techno Geek Quote  Post ReplyReply Direct Link To This Post Posted: December/10/04 at 10:09am
Originally posted by lleemon lleemon wrote:

Will,
Thanks for responding to the post.

I know it can handle the following if you provide in TP.asa (Other types: AUTH_ONLY, PRIOR_AUTH_CAPTURE, CREDIT, CAPTURE_ONLY, VOID)

The issue is changing the session variable right before you call the class to send to Authorize.

Working on some code at the moment that may post later. Just right before the class is called I will be calling the database (joining payment.Orderid = customer.Orderid) and checking to see if Address is same as shipaddress (StrComp(payment.Address, customer.shipaddress) = 0) and if not then changing Session("TxtMode") = "AUTH_ONLY"



I'm not sure if I follow. Why are you doing it this way?
Techno Geek
Customer Support Engineer
ComCity and SalesCart Technical Support
Back to Top
lleemon View Drop Down
Groupie
Groupie


Joined: March/16/04
Location: United States
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote lleemon Quote  Post ReplyReply Direct Link To This Post Posted: December/10/04 at 10:03am
I added the following code to the receipt1.asp page right before calling the class.   The page does work but all trans are coming through as AUTH_ONLY even if adderss' are the same.

Any thoughts from anyone on my code?


'Query two tables (payment, customer) and see if BillTo and ShipTo address' are the same
'if so set Session ("TxtMode") = same as it originally is else set Session ("TxtMode") = "AUTH_ONLY"
Dim adoCon2, rsAddressInfo, sSQL2, sOrgMode

sOrgMode = Session("TxtMode")

sSQL2 = "SELECT c.Orderid, c.shipaddress, p.Address "
sSQL2 = sSQL2 & "FROM customer c, payment p "
sSQL2 = sSQL2 & "WHERE c.Orderid = p.Orderid "
sSQL2 = sSQL2 & "AND c.Orderid=" & order & "; "

Set adoCon2 = Server.CreateObject("ADODB.Connection")
adoCon2.Open Session("ConnectionString")     
Set rsAddressInfo = Server.CreateObject("ADODB.Recordset")
rsAddressInfo.CursorType = 1
rsAddressInfo.LockType = 3
rsAddressInfo.Open sSQL2, adoCon2
If rsAddressInfo.EOF = True and rsAddressInfo.EOF = True Then
     Session("TxtMode") = sOrgMode
Else
     'StrComp(string1, string2, compare) compare 1 is vbTextCompare
     If StrComp(rsAddressInfo.Fields("Address"), rsAdderssInfo.Fields("shipaddress"), 1) <> 0 Then
           'Address and shipaddress do not match so change to AUTH_ONLY
           Session("TxtMode") = "AUTH_ONLY"
     Else
           'Address and shipaddress match so keep current original mode
           Session("TxtMode") = sOrgMode
     End if
End if

'Reset recordset server objects     
rsAddressInfo.Close
Set rsAddressInfo = Nothing

'Reset connection server objects
adoCon2.Close
Set adoCon2 = Nothing

Back to Top
lleemon View Drop Down
Groupie
Groupie


Joined: March/16/04
Location: United States
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote lleemon Quote  Post ReplyReply Direct Link To This Post Posted: December/08/04 at 9:27am
Will,
Thanks for responding to the post.

I know it can handle the following if you provide in TP.asa (Other types: AUTH_ONLY, PRIOR_AUTH_CAPTURE, CREDIT, CAPTURE_ONLY, VOID)

The issue is changing the session variable right before you call the class to send to Authorize.

Working on some code at the moment that may post later. Just right before the class is called I will be calling the database (joining payment.Orderid = customer.Orderid) and checking to see if Address is same as shipaddress (StrComp(payment.Address, customer.shipaddress) = 0) and if not then changing Session("TxtMode") = "AUTH_ONLY"

Back to Top
Techno Geek View Drop Down
Admin Group
Admin Group
Avatar
Evil monkey living in my closet!

Joined: March/11/04
Location: United States
Status: Offline
Points: 1206
Post Options Post Options   Thanks (0) Thanks(0)   Quote Techno Geek Quote  Post ReplyReply Direct Link To This Post Posted: December/08/04 at 9:18am
I show the function for Authorize.net can handle both AUTH_CAPTURE & AUTH_ONLY.
Techno Geek
Customer Support Engineer
ComCity and SalesCart Technical Support
Back to Top
lleemon View Drop Down
Groupie
Groupie


Joined: March/16/04
Location: United States
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote lleemon Quote  Post ReplyReply Direct Link To This Post Posted: December/07/04 at 3:28pm
Has anyone every wrote code to change the Session("TxtMode") from AUTH_CAPTURE to AUTH_ONLY during checkout?

Currently in our TP.asa file we have our Session("TxtMode") = AUTH_CAPTURE. For our customers that have different billing then shipping we want to set the Authorize.net Mode to Authorize Only and not capture so we would need to set Session("TxtMode") = AUTH_ONLY.

I see in receipt1.asp we call CTp.asp Sub setVars() Session("TxtMode") is set to TMode which is what is sent to Authorize.net. Would we just do our address compare before calling class CTP in receipt1.asp and if different set Session ("TxtMode") = 'AUTH_ONLY'?

Thanks for any advice.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.04
Copyright ©2001-2015 Web Wiz Ltd.

Copyright 2015 by ComCity® LLC and SalesCart™.  All Rights Reserved