Products » dgCharge User Guide
Object: dgCharge
dgCharge
is a server-side ActiveX® component that provides an interface
for on-line credit card transactions. In order to utilize
dgCharge, you must have at least one merchant account
with the credit card transaction processor.
dgCharge
maintains a database containing information about your merchant
account(s), transactions and settlement information.
Properties
ApprovalCode Property
The approval code returned from the transaction processor
for the transaction. It contains an approval code for approved
Force, Preauth and
Sale transactions. For approved
Void transactions, it indicates the type of transaction
that was voided (e.g. "SALE"). For all other transactions,
this property is blank. Read only.
AuthResponse Property
A string description of the authorization response returned
from the transaction processor. This property is set after
execution of the
Credit, Force, Preauth, Sale, and
Void methods. If the transaction is approved, this
property will be set to "APPROVAL"; otherwise it will contain
a short description of the reason it was not approved. The
most common values of this property are:
| Value |
Definition |
| "APPROVAL" |
The transaction was approved |
| "SERV NOT ALLOWED" |
Invalid request; e.g. merchant does not
honor the specified type of credit card |
| "REQ. EXCEEDS BAL." |
Request exceeds balance constraint on
account |
| "NOT ON FILE" |
Cardholder not found |
| "EXPIRED CARD" |
Card is expired |
| "INVALID CARD" |
Card is invalid |
| "DECLINED" |
Card not honored |
| "AMOUNT ERROR" |
Error in specified transaction amount |
| "INVLD VOID DATA" |
Invalid data on void request |
| "DECLINED CVV2" |
Request denied because CVV-2 data specified
is incorrect |
Other error responses require intervention by the credit card
issuer or transaction processor.
Read only.
AVSResponse Property
A string description of the response returned from the transaction
processor to the address information supplied. Read only.
AVS stands for Address Verification Service. This code will
tell you whether or not the address given in the order actually
matches that of the cardholder.
This property is set after execution of the
Sale, Credit,
and
Preauth methods. The possible values of this property,
and their meanings are as follows:
| Value |
Definition |
| "A" |
Street address matches; postal code does
not |
| "E" |
AVS error |
| "N" |
No match on street address or postal
code |
| "R" |
Retry; system unavailable or timed out |
| "S" |
Service not supported by issuer |
| "U" |
Address information is unavailable |
| "W" |
9-digit postal code matches; street address
does not |
| "X" |
Exact AVS match |
| "Y" |
Street address and 5-digit postal code
match |
| "Z" |
5-digit postal code matches; street address
does not |
| blank |
Address information not provided, or
AVS not supported by issuer |
CVV2Response Property
A string description of the response returned from the transaction
processor to the CVV-2 data supplied (see description of the
CVV2_data parameter in the
Preauth and
Sale
methods). Read only.
CVV stands for Card Verification Value. This is a 3-4 digit
code that is found on Visa, MasterCard, and American Express
cards. It appears on the card but nowhere else, not even on
credit card statements. Its primary purpose is to validate
that the user of the credit card actually has the card in
hand. On Visa and Mastercards, CVV-2 data consists of the
3-4 digits found after the card number on the signature strip
on the back of the card. On American Express cards, CVV-2
data consists of 3-4 digits on the front of the card, to the
upper left of the card number.
This property is set after execution of the
Preauth
and
Sale methods. The possible values of this property,
and their meanings are as follows:
| Value |
Definition |
| "M |
Match |
| "N" |
No match |
| "P" |
Not processed |
| "S" |
Issuer indicates that CVV-2 data should
be present on the card, but the merchant has indicated
that the CVV-2 data is not present on the card |
| "U" |
Issuer has not certified for CVV-2 or
issuer has not provided CVV-2 encryption keys |
| blank |
CVV-2 information not provided, or not
supported by issuer |
DebugMode Property
When set to true, allow test merchant accounts to be used.
Read or write, default is false.
DebugErrorText Property
Supplemental description of ErrorText. Useful when reporting
bugs caused by dgCharge. Read only.
ErrorText Property
A string description of the error if a transaction could not
be completed. If the transaction was completed, this property
has the value of "no error", whether or not the transaction
was approved. The
AuthResponse property indicates the
status of the transaction. The ErrorText property is set after
execution of all methods. Read only.
IsInternetBasedTransaction Property
A boolean value indicating whether or not the transaction is an
Internet based transaction. Read or write, default is true.
RecordNumber Property
The record number of the transaction. This property is set
after execution of the
Credit, Force, Preauth, Sale,
and
Void methods. Read only.
SettleBatchID Property
The batch identifier returned by the host after settlement.
This property is set after execution of the
Settle
or
CheckLastSettle method. Read only.
SettleCreditAmount Property
The total amount of all credits in the settlement batch. This
property is set after execution of the
Settle or
CheckLastSettle
method. Read only.
SettleCreditCount Property
The number of credit transactions in the settlement batch.
This property is set after execution of the
Settle
or
CheckLastSettle method. Read only.
SettleDate Property
The date of the settlement. This property is set after execution
of the
Settle method. Read only.
SettleNetAmount Property
The net (sales + forces - credits) amount of transactions
in the settlement batch. This property is set after execution
of the
CheckLastSettle method. Read only.
SettleNetCount Property
The net (sales + forces - credits) number of transactions
in the settlement batch. This property is set after execution
of the
CheckLastSettle method. Read only.
SettlePurchaseAmount Property
The total amount of all debit card purchase and preauth completions
in the settlement batch. This property is set after execution
of the
CheckLastSettle method. Read only.
SettlePurchaseCount Property
The number of debit card purchase and preauth completions
in the settlement batch. This property is set after execution
of the
CheckLastSettle method. Read only.
SettleResponse Property
The settlement response from the host. If the settlement was
successful, this property contains a string beginning with
"GBOK." This property is set after execution of the
Settle
or
CheckLastSettle method. Read only.
SettleSaleAmount Property
The total amount of all sales in the settlement batch. This
property is set after execution of the
Settle or
CheckLastSettle
method. Read only.
SettleSaleCount Property
The number of sale transactions in the settlement batch. This
property is set after execution of the
Settle or
CheckLastSettle
method. Read only.
SettleTime Property
The time of the settlement. This property is set after execution
of the
Settle method. Read only.
SettleVoidAmount Property
The total amount of all voids in the settlement batch. This
property is set after execution of the
Settle or
CheckLastSettle
method. Read only.
SettleVoidCount Property
The number of void transactions in the settlement batch. This
property is set after execution of the
Settle or
CheckLastSettle
method. Read only.
TransDate Property
The transaction date. This property is set after execution
of the
Credit, Force, Preauth, Sale, and
Void
methods. Read only.
TransID Property
The value of the "TransID" field of the transaction record
stored in the database. This value uniquely identifies the
record containing all of the information about the transaction.
This property is set after execution of the
Credit, Force,
Preauth, Sale, and
Void methods. Read only.
TransTerminalID Property
The ID of the terminal used to process the transaction. Read
only.
TransTime Property
The transaction time. This property is set after execution
of the
Credit, Force, Preauth, Sale, and
Void
methods. Read only.
Version Property
A string containing the version/edition information about
the
dgCharge component. Read only.
Methods
AddMerchant (bank_nbr,
auto_settlement, description, store_trans_data_locally)
Adds a new merchant to the database.
AddTerminal (terminal_nbr)
Adds a new terminal to the database.
CheckLastSettle
Check the results of the most recent settlement batch.
Credit (amount, card_nbr,
exp_date, customer_ID, customer_name, description, street_adr,
postal_code, purchase_card_nbr, purchase_card_tax)
Processes a credit transaction.
Decrypt (text)
Decrypts encrypted credit-card data.
Force (amount, card_nbr, exp_date,
approval_code, customer_ID, customer_name, description)
Processes a force transaction.
MagSwipeSale (amount,
track_data, customer_ID, description)
Processes a sale transaction with credit-card data read from
a magnetic card reader.
Preauth (amount, card_nbr,
exp_date, CVV2_data, customer_ID, customer_name, description,
street_adr, postal_code, purchase_card_nbr, purchase_card_tax)
Processes a preauthorization transaction.
Sale (amount, card_nbr, exp_date,
CVV2_data, customer_ID, customer_name, description, street_adr,
postal_code, purchase_card_nbr, purchase_card_tax)
Processes a sale transaction.
SetMerchant (merchant_id)
Identifies the merchant for subsequent transactions. This
method must be called before any other method is called.
Settle (max_transaction)
Settles transactions in the open batch. This method only applies
when the current merchant requires manual settlement. Please
see description of the
AddMerchant method for more
information about settlement types.
Void (amount, card_nbr, exp_date,
record_number, terminal_id, customer_ID, customer_name,
description)
Processes a void transaction.