West Wind Web Store |
Class wwLinkPoint
|
The wwLinkPoint class interfaces with the LinkPoint API via COM. The process of using LinkPoint involves:
You can download the LinkPoint API from:
https://www.linkpoint.com/viewcart/
You'll want to use the LinkPoint API COM Object download for Windows. This download includes a DLL (LpiCom_6_0.dll) which you can copy anywhere on your system and register for COM. If you only use it with the Web Store copy it into your /wwStore directory. To register use:
regsvr32 <fullPath>\LPICom_6_0.dll
With this information you can run your code:
LOCAL oCC as wwLinkPoint oCC=CREATEOBJECT("wwLinkPoint") *** Optionally log transactions and errors oCC.cLogFile = "d:\ccLinkpointLog.txt" *** Point at the Test server oCC.cServer = "staging.linkpt.net" oCC.nPort = 1129 && Make sure you set this! *** Point at your .PEM file oCC.cCertificate = sys(5) + curdir() + "wwStore\LinkPointTest.pem" *** Provide your Identity oCC.cStorename = "1234512345" &&& Store number oCC.cStorePassword = "12345678" *** Run Test Transaction oCC.lTestTransaction = .T. *** You can optionally run a PreAuth only oCC.lPreAuthOnly = .F. *** Provide contact info oCC.cName = "Joe Doe" && or cFirstName/cLastName oCC.cCompany = "Test Company" oCC.cAddress = "123 Noit Road" oCC.cCity = "concord" oCC.cState = "CA" oCC.cZip = "94512" oCC.cCountry = "US" && CA, MX, DE, FR, AU etc. oCC.cEmail = "test@loser.com" oCC.nOrderAmount = 1.50 && use negative number for credits *** Use a test credit card - change number ot make fail oCC.cCardNo = "4111 1111 1111 1111" oCC.cCardExpiration = "07/2005" && cExpYear,cExpMonth *** Validate the card llResult = oCC.ValidateCard() IF llResult ? "Charge Approved" ELSE ? o.cValidateResult && FAILED or DECLINED ? o.cValidatedMessage && Provider Message ? o.cErrorMsg && True error message (includes system errors) ENDIF *** Display the full Response returned from LinkPoint ShowText( oCC.cHttpRESULT ) RETURN