Welcome, Guest ( Customer Panel | Login )




 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-CART 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
0 Item(s)
$0.00