VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Customization
 Delete credit card numbers from cart
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

eabrams
VP-ASP New User

USA
72 Posts

Posted - December 09 2004 :  10:34:44  Show Profile  Visit eabrams's Homepage  Reply with Quote
I am sharing some code we use to delete credit card numbers numbers from the shopping cart before the information gets sent to our payment gateway (this is froma version 4 cart). In our case it is Plug N Pay.

In out payment gateway file pnpapishoppayment.asp I modify GetDataBaserecord by making a call to SPWSremoveCardNumber after the variables are populated.

I then created the subroutine SPWSremoveCardNumber to put NULL to the credit card fields.


'*************************************************************
' Get Database Record
' Probably no change required here
'**************************************************************
Sub GetDatabaseRecord(oid)
dim strsql
OpenOrderDB dbc ' Open the database


.....

pcardaddress = orders("ocardaddress")
porderamount=formatnumber(porderamount,2) ' make it only two digits
pcvv = right( orders("oauthorization"), 4 )

'EJA 12/9 remove credit card number
SPWSremoveCardNumber

Orders.close
set Orders=Nothing
ShopCloseDatabase dbc
end sub

'***************************************************************
' Removes Credit Card Number from PNP.
''Eric Abrams www.spws.net
'**************************************************************
Sub SPWSremoveCardNumber
Dim sqltemp
Dim rstemp
OpenOrderDb dbc
sqltemp="select * from orders where orderid=" & session("oid")
Set rstemp = Server.CreateObject("ADODB.Recordset")
rstemp.open sqltemp, dbc, 1, 3
rstemp.update

'EJA 12/7/04 remove cc info
rstemp("ocardname")="NULL"
rstemp("ocardno")="NULL"
rstemp("ocardexpires")="NULL"
rstemp("ocardaddress")="NULL"

rstemp.update
rstemp.close
set rstemp=nothing
ShopCloseDatabase dbc
end sub

===============================

If you are using 5.5 and the PnP gateway from VPASP there is an option

const keepcreditcard="No" 'If Yes then credit card numbers are stored in the database





http://www.spws.net

Edited by - eabrams on December 10 2004 06:57:16
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000