eabrams
VP-CART New User
USA
72 Posts |
Posted - December 09 2004 : 10:34:44
|
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 |
|