This is an old revision of the document!
This document describes two example Access databases that use the USA ePay XCharge component with Access forms to perform transactions in the USA ePay gateway.
One example database uses the Active-X Com component (.dll), and the other uses the Active-X control (.ocx) version of the XCharge component.
The examples provided demonstrate only two ways to implement XCharge's functionality in Access. Some developers prefer not to use forms at all or even use other Office applications. How you implement XCharge's functionality in your project is entirely up to you.
Before running the Access examples, you must first make sure that your system meets the requirements of the USA ePay XCharge component, and install the latest version of the XCharge component (with documentation) by clicking here.
The example databases require Microsoft Access 2000 or newer. Even though the example file requires Access 2000, you can use the XCharge control in any Office product that supports Active-X.
Follow these steps to run the Access example forms:
Follow these steps to view the code that runs when the form is executed:
Syntax and descriptions of the various properties and methods available in the XCharge component can be found in the “XCharge Component Documentation” shortcut on your start menu and here.
To use the XCharge component in your own database you must first add a reference to the XCharge component.
Follow these steps to add the COM (.dll) version of the XCharge component to your database:
Follow these steps to add the control (.ocx) version of the XCharge component to your database:
Just like ASP, VBA does not recognize Active-X enumerations. So if you want to use named values (XCharge1.Command=CommandType.cvoid), instead of numbers (XCharge1.Command=2), you must include a module in your project that contains the following enumeration values:
Public Enum CommandType sale = 0 credit = 1 cvoid = 2 authonly = 3 capture = 4 postauth = 5 check = 6 checkcredit = 7 End Enum
Public Enum ScheduleType daily = 0 weekly = 1 biweekly = 2 monthly = 3 bimonthly = 4 quarterly = 5 annually = 6 biannually = 7 End Enum
Public Enum StatusType Approved = 0 Declined = 1 Verification = 2 Error = 3 End Enum
Public Enum CptTermTypeType pos = 0 StandAlone = 1 Unattended = 2 TermTypeUnknown = 3 End Enum
Public Enum CptMagSupportType MagSupportYes = 0 MagSupportNo = 1 MagSupportUnknown = 2 End Enum