Class AR_CreditCardCommon

Properties

LOCAL cARDivisionNoCol$="ARDivisionNo$"  

AR DivisionNo Column Name, Default = ARDivisionNo$, Pre-Child Collection validation to insure the AR Divsion Number and Customer Number columns are set prior to attempting the child collection validation.

LOCAL cCustomerNoCol$="CustomerNo$"  
CustomerNo Column Name, Default = CustomerNo$, Pre-Child Collection validation to insure the AR Divsion Number and Customer Number columns are set prior to attempting the child collection validation.
LOCAL ccpNOTSUPPLIED$="not supplied"  
used to submit a required SPS column value not otherwise set
PROPERTY ARCreditCard   * Read Only *
File Handle to AR_CreditCard class for processing credit card/ACH tranactions.
PROPERTY AllowCreditCard   * Read Only *
AllowCreditCard = Boolean when true, Entry of credit card/ACH information is allowed
PROPERTY AllowCreditCardVoidReAuth   * Read Only *
AllowCreditCardVoidReAuth = Boolean when true user has the right to void / reauthorize previously authorized credit card transactions
PROPERTY AllowACHVoidReAuth   * Read Only *
AllowACHVoidReAuth = Boolean when true user has the right to void / reauthorize previously authorized ACH transactions
PROPERTY AllowOverrideCCOnCM   * Read Only *
AllowOverrideCCOnCM = Boolean when true user has right to use any credit card and transaction amount on a credit memo
PROPERTY PaymentTypeMethod$   * Read Only *
PaymentTypeMethod$ = Returns pmtACH$ (A), pmtCHECK$ (C), pmtCREDIT$ (R), pmtOTHER$ (O) or pmtCOD$ (D) from AR Payment Type record
PROPERTY AllowCorporateCard   * Read Only *
AllowCorporateCard = Boolean when true, AR Payment type is configured to allow processing of corporate credit card level 2 transaction requests
PROPERTY ShowCorporateCCLevel3   * Read Only *
ShowCorporateCCLevel3 = Boolean when true, AR Payment type is configured to append corporate level 3 data elements to corporate card level 2 data elements when processing of corporate credit card transaction requests
PROPERTY AddCorporateCardLevel3$   * Read Only *
AddCorporateCardLevel3$ when isYES$, current document is setup to append corporate card level 3 data elements to corporate card level 2 data elements when processing of corporate credit card transaction requests
PROPERTY SPSPaymentType   * Read Only *
SPSPaymentType = Boolean when true, Merchant ID and Key in AR Payment type has been validated as a CreditCard/ACH type with SPS Exchange
PROPERTY SPSEnabled   * Read Only *
SPS Enabled = Boolean when true, SPS Exchange has been enabled in Company Maintenance
PROPERTY CreditCardUI  
Credit Card UI = Boolean when true, SPS Exchange UI will be defaulted on (for use with AR_CreditCardCommonEntry_ui and data entry programs)
PROPERTY Source$  
Source table to retrieve record for credit card/ACH transaction
PROPERTY Request_v1   * Read Only *
Handle to SPS Exchange top level Request Object (instantiated in ARCreditCard)
PROPERTY SOIntegrated   * Read Only *
[Boolean] When true SO has been setup for the current company
PROPERTY ITIntegrated   * Read Only *
[Boolean] When true IT has been setup for the current company
PROPERTY LastPaymentEMVReceipt$   * Read Only *
XML Snippet of EMV Receipt returned for last payment transaction request processed on current document
PROPERTY LastDepositEMVReceipt$   * Read Only *
XML Snippet of EMV Receipt returned for last depposit transaction request processed on current document (applies on SO documents only)

Methods

FUNCTION AddNewCreditCard(pmtType$, cc$, yr$, mo$)  
FUNCTION AddNewCreditCard(pmtType$, cc$, yr$, mo$, fromEbmStore)  

Add new credit card to SPS Vault, When successful, CreditCardGUID$, CreditCardID$, Last4UnencryptedCreditCardNos$, ExpirationDateYear$, ExpirationDateMonth$, CardType$ is set via SetPartialRecord())

ParameterDescription
pmtType$ [input, string] Payment Type
cc$ [input, string] Credit Card Number to add
yr$ [input, string] Credit Card Expiration Year (yyyy)
mo$ [input, string] Credit Card Expiration Month (mm)
fromEbmStore {optional} [input boolean] identifies when processiong from .store / allows divNo$ and CustNo to be null when assigning the next CardID$
Returns [boolean] True = success, False = failure
FUNCTION CheckCreditCardTrackingID(ccTrackingID$, transactionProcessed)  

Query SPS Exchange to retrieve status of transaction previously submitted

ParameterDescription
ccTrackingID$ [input, string] CreditCardTrackingID$ submitted to SPS Exchange when the original transaction request was submitted
transactionProcessed [output, boolean] True = success, transaction was successfully processed previously, CC transaction columns have been updated, false = transaction was not successfully completed on previous submission
Returns [boolean] True = success, False = failure
FUNCTION ClearCreditCardInfo()  

Clear all Credit Card/ACH Specific Columns

Returns [boolean] True = success
FUNCTION GetNextCreditCardID(nextCardID$)  
FUNCTION GetNextCreditCardID(nextCardID$, fromEbmStore)  

Get Next Available Credit Card ID number (divNo, CustNo and pmtType must be set in busObj)

ParameterDescription
nextCardID$ [ourtput, string] Next Available Credit Card ID number
fromEbmStore {optional} [input boolean] identifies when processing from .store / allows divNo$ and CustNo to be null
Returns [boolean] True = success, False = failure
FUNCTION GetPrimaryCreditCard(ccGUID$, divNo$, custNo$, payMethod$)  
FUNCTION GetPrimaryCreditCard(ccGUID$, divNo$, custNo$)  
FUNCTION GetPrimaryCreditCard(ccGUID$)  

Get Primary Credit Card/ACH GUID From AR_Customer

ParameterDescription
ccGUID$ [output, string] AR_Customer CreditCardGUID$ column value
divNo$ {optional} [input, string] AR_Customer ARDivisionNo$ column value, when null passed ARDivisionNo$ previously set will be used
custNo$ {optional} [input, string] AR_Customer CustomerNo$ column value, when null passed CustomerNo$ previously set will be used
payMethod$ {optional} [input, string] Payment method required, only return primary credit card if its payment method matches this value
Returns [boolean] True = success, AR_Customer CreditCardGUID$ column value retrieved / returned in ccGUID$ output argument; False = failure.
FUNCTION ProcessCCVoid()  

sets the cProcessCCVoid local property to true so the void transaction will be processed when previously authorized when deleting (existing records) or clearing (new records) the record state

Returns [boolean] True = success, False = failure (the user does not have sufficent security rights to process the void transaction).
FUNCTION ProcessCreditCard(void, inclUI, type$, key$)  
FUNCTION ProcessCreditCard(void, inclUI, type$)  
FUNCTION ProcessCreditCard(void, inclUI)  
FUNCTION ProcessCreditCard(void, type$, key$)  
FUNCTION ProcessCreditCard(key$, rec$)  
FUNCTION ProcessCreditCard(key$)  
FUNCTION ProcessCreditCard()  

Process credit card/ACH transaction

ParameterDescription
void {optional} [input, boolean] True = Process void / credit transaction to reverse previously completed credit card transaction; -1 = Void failed, process credit
inclUI {optional} [input, boolean] Utilize SPS Credit Card Dialog to process credit card transaction request, default is true when _OBJ'_Class$ = "AR_CashReceipts_bus", "AR_Invoice_bus", "SO_SalesOrder_Bus" and "SO_Invoice_bus" and not processing a void; Otherwise default is false.
type$ {optional} [input, string] Credit Card Transaction Request type to process, if blank the default type based upon source location will be used (AR Invoice = Sale, AR Cash Receipts = Sales, Sales Order = Authorization, Sales Order Invoice = Authorization)
key$ {optional} [input, string] Key of the record containing the credit card information to use to process the credit card transaction request, if blank the current record in the object memory will be used.
rec$ {optional} [input, string] String containing the REC() of record containing the credit card information to use to process the credit card transaction request. For use when the record is already extracted (in updates).
Returns [boolean] True = success, False = failure
FUNCTION ProcessVault(service$, payType$, guid$, last4Nos$, expYear$, expMonth$, cardType$, last4RoutingNo$, last4AcctNo$, acctType$)  

Use AR_CreditCard'ProcessVault to Create or Update credit card or bank account data in Sage Exchange Vault (includes display of SPS Vault dialog)

ParameterDescription
service$ [input, string] Value for vaultOp'VaultStorage'Service$ node of XML
payType$ [input, string] PaymentType$ needed to determine m_id$ and m_key$
guid$ [input & output, string] GUID value to be updated or returned if "CREATE"
last4Nos$ [output, string] Value for Last4UnencryptedCreditCardNos$ column
expYear$ [output, string] Value for ExpirationDateYear$ column
expMonth$ [output, string] Value for ExpirationDateMonth$ column
cardType$ [output, string] Value for CardType$ column
last4RoutingNo$ [output, string] Value for Last4BankRoutingNos$ column
last4AcctNo$ [output, string] Value for Last4BankAccountNos$ column
acctType$ [output, string] Value for BankAccountType$ column
Returns [boolean] Success if card/account was created or updated in the vault, Warning if cancel was pressed, otherwise failure
FUNCTION SkipCCVoid()  

sets the cSkipCCVoid local property to true so the void transaction will not be processed when previously authorized when deleting (existing records) or clearing (new records) the record state

Returns [boolean] True = success, False = failure (the user does not have sufficent security rights to skip the void transaction).
FUNCTION LOCAL AddLevel3LineItem(nP, nLvl3)  

Pre Credit Card Adds Level 3 line to LineItems arrary

ParameterDescription
nP [input integer] XML Node handle for payment
nLvl3 [input integer] XML Node handle for Level3LineItemType
Returns [boolean] True = success
FUNCTION LOCAL AddLevel3LineItems(oDtl, oPmnt, srce$)  

Corporate Card - Add Line Item Detail method

ParameterDescription
oDtl [input integer] handle to the document detail object
oPmnt [input integer] handle to the payment transaction object
srce$ [input, string] Source location to perform credit card processing
Returns [boolean] True = success
FUNCTION LOCAL CheckAmount(value, column$)  
FUNCTION LOCAL CheckAmount(value)  

Vaildate credit card transaction amount and CorporateSalesTax amount submissions

ParameterDescription
value [input, numeric] value to check
column$ (optional) [input, string] column description to use in error messaging, if blank 'credit card transaction' will be used
Returns [boolean] True = success, False = failure, -1 = warning (when amount submitted = 0)
FUNCTION LOCAL CreditCardSubmit(progressBar, message$, title$)  
FUNCTION LOCAL CreditCardSubmit(progressBar, message$)  
FUNCTION LOCAL CreditCardSubmit(progressBar)  
FUNCTION LOCAL CreditCardSubmit()  

Submit Credit Card/ACH Transaction to SPS

ParameterDescription
progressBar {optional} [input boolean] true = display transaction in process progress bar (for use when performing UI-less transaction requests), default = false
message$ {optional} [input string] progress bar message to display, null = display current progress bar message when it exists and no message when it does not
title$ {optional} [input string] progress bar title to dsiplay, null = display current title or 'Processing Credit Card Transaction' when creating a new progress bar
Returns [interger] handle to SPS Exchange response object
FUNCTION LOCAL GetCardIDTables(tables$, keyNos$, fromEbmStore)  
FUNCTION LOCAL GetCardIDTables(tables$, keyNos$)  

Open tables to check for the existience of a CreditCardID (used by the GetNextCreditCardID() method).

ParameterDescription
tables$ [output, string] SEP separated list of table channels to search.
keyNos$ [output, string] SEP separated list of KNO's (index) to use when performing the SELECT on channels in tables$. (Note: the index must start with ARDivisionNo then CustumerNo for the SELECT to function properly.)
fromEbmStore {optional} [input boolean] identifies when processiong from .store / allows divNo$ and CustNo to be null when assigning the next CardID$
Returns [boolean] True = success
FUNCTION LOCAL GetPaymentTypeProperties(pmtType$)  
FUNCTION LOCAL GetPaymentTypeProperties()  

Get Payment Type Properties, common method to set PaymentTypeMethod$, AllowCorporateCard and SPSPaymentType public properties

ParameterDescription
pmtType$ (optional) [input, string] PaymentType$ to retrieve, when blank the business object PaymentType$ value will be used
Returns [boolean] True = success, False = failure (PaymentType$ is null or does not exist in the AR_PaymentType table.)
FUNCTION LOCAL PostCreditCardSubmit()  

Post Credit Card/ACH Submit customization method, will not affect transaction request success / failure return value

Returns [boolean] True = success
FUNCTION LOCAL PreCreditCardSubmit()  

Pre Credit Card/ACH Submit customization method, transaction request will be aborted when failure returned

Returns [boolean] True = success
FUNCTION LOCAL ResolveAVSState(country$, stateCode$, out.StateValue$)  

Resolves state to either a state code for Canada and the US or to the state name for international addresses

ParameterDescription
country$ [input, string] 3 character country code associated with the state
stateCode$ [input, string] 2 character state/province code
out.StateValue$ [output, string] returned value to use for the state, will be 2 character code if US or CAN and state name if other
Returns [boolean]
ValueDescription
retSUCCESS(1) - If state was able to be resolved
retFAILURE(0) - If state was not able to be resolved. out.State will be returned as 2 character code passed in.
FUNCTION LOCAL SetSource(srce$)  

Set Source tables, Called when setting the Source propertey

ParameterDescription
srce$ [input, string] Source location to perform credit card processing
Returns [boolean] True = success, False = failure (the srce$ location is not supported).
FUNCTION LOCAL SetSourceInfo(srce$, type$, void, creditMemo, soDeposit, TransactionType$, Reference1$, Amount, preAuthCol$)  

Set credit card/ACH tansaction information based upon source location

ParameterDescription
srce$ [input, string] Source location to perform credit card processing
type$ [input, string] Transaction Type to process, null = default transaction type based upon source location
void [input, boolean] When true, void the transaction previously processed on the record
creditMemo [input, boolean] When true, processing a credit memo in AR Invoice or SO Invoice entry
soDeposit [input, boolean] When true, processing a deposit (sales) transaction in SO Order or SO Invoice entry
TransactionType$ [output, string] SPS Transaction Code to set
Reference1$ [output, string] SPS Reference1$ to set
Amount [output, numeric] SPS Amount to set
preAuthCol$ [output, string] PreAuthorization Amount column name
Returns [boolean] True = success, False = failure (the srce$ location is not supported).
FUNCTION LOCAL SetUIOptions()  

Set SPS UI options

Returns [boolean] True = success
FUNCTION LOCAL TranslateDateTime(dateIn$, authDate$, authTime$)  

Translate transaction date time stamp returned by SPS Exchange to authorization date and authorization time

ParameterDescription
dateIn$ [input, string] transactionDate date / time stamp string returned by SPS Exchange
authDate$ [output, string] date fomratted YYYYMMDD
authTime$ [output, string] time fomratted 00.00000
Returns [boolean] True = success
FUNCTION LOCAL TranslateTime(timeIn$, authTime$)  

Translate authorization time to decimal format

ParameterDescription
timeIn$ [input, string] authorization time from SPS Exchange or entered by user
authTime$ [output, string] time fomratted 00.00000
Returns [boolean] True = success or False = failure

Properties inherited from: AR_Constant

pmtACH$, pmtCHECK$, pmtCREDIT$, pmtOTHER$, pmtCOD$, typPAYMENT$, typDEPOSIT$

Properties inherited from: CI_Constant

itmREGULAR$, itmSPECIAL$, itmCHARGE$, itmCOMMENT$, itmMISC$, valSTANDARD$, valAVERAGE$, valFIFO$, valLIFO$, valLOT$, valSERIAL$, typFINISHEDGOODS$, typRAWMATERIALS$, typDISCONTINUED$, typKIT$, proMAKE$, proBUY$, proSUBCONTRACT$

Properties inherited from: SY_Password

AESCipher$, AES256Cipher$

Methods inherited from: AR_Constant

CheckExpirationDate(), DetermineCardType$()

Methods inherited from: CI_Constant

GetCalendarEndingDate(), GetDefaultExtendedDescriptionKey$()

Methods inherited from: SY_Password

ConfirmAESKey(), ConfirmPassword(), EncryptAESData(), EncryptAESKey(), EncryptAESPassword(), EncryptPassword(), GetAESDataTest$(), PasswordAcceptable(), ValidateAESData(), ValidateAESPassword(), ValidatePassword(), VerifyAESDataEncryption(), DecryptAESData(), DecryptAESKey(), DecryptAESPassword(), DecryptAltAESData(), DecryptPassword(), EncryptAltAESData(), GetKEK$(), InitAESKey(), InitializeAES(), InitializeAltAES(), ValidateAltAESData(), VerifyAltAESDataEncryption()