CWS Wrapper Library  5.1.0
Public Member Functions | Properties | List of all members
CWSWrapper.CWS Class Reference

Root class for C# access to CWS's RESTful API. More...

Public Member Functions

 CWS ()
 Creates an instance of CWS More...
 
void Start (String logFile, int level)
 Start the CWSWrapper and initialize a log file and logging level More...
 
void Stop ()
 Undo start. More...
 
OpenPaymentGatewayResults OpenPaymentGateway (OpenPaymentArgs opargs, NotifyCWSEvent ne)
 C# must perform an "open" before any transaction requests. The integrator will pass information so that Converge can identify the account.
This "open" request will return a "paymentGatewayId" that must be passed to all subsequent transactions. More...
 
bool StartExtraChargeCalculation (CalculateExtraChargeArgs pargs, NotifyCWSEvent ne, PaymentTransactionComplete pc)
 Kick off extra charge calculation process. More...
 
PaymentTransactionResults CalculateExtraCharge (CalculateExtraChargeArgs pargs, NotifyCWSEvent ne)
 Calculate extra charge. More...
 
bool StartPaymentTransaction (PaymentArgs pargs, NotifyCWSEvent ne, PaymentTransactionComplete pc)
 Kick off a payment transaction. More...
 
PaymentTransactionResults PaymentTransaction (PaymentArgs pargs, NotifyCWSEvent ne)
 Start a payment transaction and wait until it completes. More...
 
bool StartLinkedRefund (String paymentGatewayId, String origTransId, String tenderType, String cardType, Money amount, String note, NotifyCWSEvent ne, PaymentTransactionComplete bec)
 Start a linked refund More...
 
PaymentTransactionResults LinkedRefund (String paymentGatewayId, String origTransId, String tenderType, String cardType, Money amount, String note, NotifyCWSEvent ne)
 Perform a linked refund and wait until complete More...
 
bool StartTipAdjust (String paymentGatewayId, String origTransId, Money tipAmount, bool verifyTipAdjustByIssuer, NotifyCWSEvent ne, PaymentTransactionComplete bec)
 Start a tip adjust More...
 
PaymentTransactionResults TipAdjust (String paymentGatewayId, String origTransId, Money tipAmount, bool verifyTipAdjustByIssuer, NotifyCWSEvent ne)
 Perform a tip adjust and wait until complete More...
 
bool StartPrintPaymentReceipt (PrintPaymentArgs args, NotifyCWSEvent ne, PaymentTransactionComplete ptc)
 Start printing a receipt. More...
 
PaymentTransactionResults PrintPaymentReceipt (PrintPaymentArgs args, NotifyCWSEvent ne)
 Print a receipt and wait for it to complete More...
 
bool StartEmailPaymentReceipt (EmailPaymentArgs args, NotifyCWSEvent ne, PaymentTransactionComplete ptc)
 Email a receipt. More...
 
PaymentTransactionResults EmailPaymentReceipt (EmailPaymentArgs args, NotifyCWSEvent ne)
 Email a receipt and wait until complete. More...
 
bool StartFilePaymentReceipt (PrintPaymentArgs args, NotifyCWSEvent ne, PaymentTransactionComplete ptc)
 Start a print receipt to file More...
 
PaymentTransactionResults FilePaymentReceipt (PrintPaymentArgs args, NotifyCWSEvent ne)
 Print a receipt to file and wait More...
 
bool StartHandleBinLookupResult (string paymentGatewayId, string chanId, HandleBinLookupResultInfo handleBinLookupResultInfo, NotifyCWSEvent ne, PaymentTransactionComplete ptc)
 Handle a bin lookup result and continue a payment transaction with relevant information More...
 
PaymentTransactionResults HandleBinLookupResult (string paymentGatewayId, string chanId, HandleBinLookupResultInfo handleBinLookupResultInfo, NotifyCWSEvent ne)
 Handle a bin lookup result and continue a payment transaction with relevant information and wait More...
 
bool StartContinuePaymentTransaction (string paymentGatewayId, string chanId, Dictionary< string, string > requiredInfo, NotifyCWSEvent ne, PaymentTransactionComplete ptc)
 Continue a payment transaction with required information More...
 
PaymentTransactionResults ContinuePaymentTransaction (string paymentGatewayId, string chanId, Dictionary< string, string > requiredInfo, NotifyCWSEvent ne)
 Continue a payment transaction and wait More...
 
bool StartCancelPaymentTransaction (string paymentGatewayId, string chanId, NotifyCWSEvent ne, PaymentTransactionComplete ptc)
 Cancel a payment transaction without waiting. More...
 
PaymentTransactionResults CancelPaymentTransaction (string paymentGatewayId, string chanId, NotifyCWSEvent ne)
 Cancel a payment transcation and wait More...
 
bool StartTransactionSearch (TransactionSearchArgs ts_args, NotifyCWSEvent ne, TransactionSearchComplete tsc)
 Search for transactions based on passed in search criteria More...
 
TransactionSearchResults TransactionSearch (TransactionSearchArgs ts_args, NotifyCWSEvent ne)
 Search for transaction and wait until complete More...
 
bool StartValidateAccount (String paymentGatewayId, NotifyCWSEvent ne, PaymentTransactionComplete ptc)
 Start a validate account More...
 
PaymentTransactionResults ValidateAccount (String paymentGatewayId, NotifyCWSEvent ne)
 Validate account and wait until complete More...
 

Properties

string URL [get, set]
 Get/Set URL of CWS More...
 
int DelayMillis [get, set]
 Get/Set delay between polls to CWS More...
 
int MaxWaitMillis [get, set]
 Get/Set maximun transaction time, in milliseconds More...
 

Detailed Description

Root class for C# access to CWS's RESTful API.

Constructor & Destructor Documentation

◆ CWS()

CWSWrapper.CWS.CWS ( )
inline

Creates an instance of CWS

Member Function Documentation

◆ CalculateExtraCharge()

PaymentTransactionResults CWSWrapper.CWS.CalculateExtraCharge ( CalculateExtraChargeArgs  pargs,
NotifyCWSEvent  ne 
)
inline

Calculate extra charge.

Parameters
pargsAn object that specifies the required and optional parameters
neA delegate to receive informational messages
Returns
PaymentTransactionResults

◆ CancelPaymentTransaction()

PaymentTransactionResults CWSWrapper.CWS.CancelPaymentTransaction ( string  paymentGatewayId,
string  chanId,
NotifyCWSEvent  ne 
)
inline

Cancel a payment transcation and wait

Parameters
paymentGatewayIdPaymentGatewayId returned from OpenPaymentGateway
chanIdChanId returned from StartPaymentTransaction
neDelegate to handle notify events
Returns
Results of the payment transaction

◆ ContinuePaymentTransaction()

PaymentTransactionResults CWSWrapper.CWS.ContinuePaymentTransaction ( string  paymentGatewayId,
string  chanId,
Dictionary< string, string >  requiredInfo,
NotifyCWSEvent  ne 
)
inline

Continue a payment transaction and wait

Parameters
paymentGatewayIdPaymentGatewayId returned from OpenPaymentGateway
chanIdChanId returned from StartPaymentTransaction
requiredInfoDictionary of names/values of required information
neDelegate to receive notify events
Returns
Results of the payment transaction

◆ EmailPaymentReceipt()

PaymentTransactionResults CWSWrapper.CWS.EmailPaymentReceipt ( EmailPaymentArgs  args,
NotifyCWSEvent  ne 
)
inline

Email a receipt and wait until complete.

Parameters
argsEmailPaymentArgs
neDelegate to receive notify events
Returns
PaymentTransactionResults

◆ FilePaymentReceipt()

PaymentTransactionResults CWSWrapper.CWS.FilePaymentReceipt ( PrintPaymentArgs  args,
NotifyCWSEvent  ne 
)
inline

Print a receipt to file and wait

Parameters
argsPrintPaymentArgs
neDelegate to receive notify events
Returns

◆ HandleBinLookupResult()

PaymentTransactionResults CWSWrapper.CWS.HandleBinLookupResult ( string  paymentGatewayId,
string  chanId,
HandleBinLookupResultInfo  handleBinLookupResultInfo,
NotifyCWSEvent  ne 
)
inline

Handle a bin lookup result and continue a payment transaction with relevant information and wait

Parameters
paymentGatewayIdPaymentGatewayId returned from OpenPaymentGateway
chanIdChanId returned from StartPaymentTransaction
handleBinLookupResultInfoInformation for continuing the transaction
neDelegate to receive notify events
Returns
Results of the payment transaction

◆ LinkedRefund()

PaymentTransactionResults CWSWrapper.CWS.LinkedRefund ( String  paymentGatewayId,
String  origTransId,
String  tenderType,
String  cardType,
Money  amount,
String  note,
NotifyCWSEvent  ne 
)
inline

Perform a linked refund and wait until complete

Parameters
paymentGatewayIdId returned from openPaymentGateway
origTransIdThe transaction id for the transaction you wish to refund
tenderTypeType of tender
cardTypeCard Type
amountAmount to be refunded
noteOptional note
neNotificaion callback
Returns
PaymentTransactionResults

◆ OpenPaymentGateway()

OpenPaymentGatewayResults CWSWrapper.CWS.OpenPaymentGateway ( OpenPaymentArgs  opargs,
NotifyCWSEvent  ne 
)
inline

C# must perform an "open" before any transaction requests. The integrator will pass information so that Converge can identify the account.
This "open" request will return a "paymentGatewayId" that must be passed to all subsequent transactions.

Parameters
opargsObject contains your credentials and other information
neA delegate to receive informational callbacks
Returns
OpenPaymentGatewayResults

◆ PaymentTransaction()

PaymentTransactionResults CWSWrapper.CWS.PaymentTransaction ( PaymentArgs  pargs,
NotifyCWSEvent  ne 
)
inline

Start a payment transaction and wait until it completes.

Parameters
pargsAn object that specifies the required and optional parameters
ne>A delegate to receive informational messages
Returns
PaymentTransactionResults

◆ PrintPaymentReceipt()

PaymentTransactionResults CWSWrapper.CWS.PrintPaymentReceipt ( PrintPaymentArgs  args,
NotifyCWSEvent  ne 
)
inline

Print a receipt and wait for it to complete

CWS can print the receipt for the most recent transaction or a transaction by transactionId.

If PrintPaymentArgs.transactionId is null, the most recent transaction will be printed.

Parameters
argsPrintPaymentArgs contaimn optional arguments
neNotification callback
Returns
PaymentTransactionResults

◆ Start()

void CWSWrapper.CWS.Start ( String  logFile,
int  level 
)
inline

Start the CWSWrapper and initialize a log file and logging level

Parameters
logFileFull path to log file
levelLevel of logging 0: none, 4 maximum

◆ StartCancelPaymentTransaction()

bool CWSWrapper.CWS.StartCancelPaymentTransaction ( string  paymentGatewayId,
string  chanId,
NotifyCWSEvent  ne,
PaymentTransactionComplete  ptc 
)
inline

Cancel a payment transaction without waiting.

Parameters
paymentGatewayIdPaymentGatewayId returned from OpenPaymentGateway
chanIdChanId returned from StartPaymentTransaction
neDelegate to handle notify events
ptcDelegate to be called when cancel is complete
Returns

◆ StartContinuePaymentTransaction()

bool CWSWrapper.CWS.StartContinuePaymentTransaction ( string  paymentGatewayId,
string  chanId,
Dictionary< string, string >  requiredInfo,
NotifyCWSEvent  ne,
PaymentTransactionComplete  ptc 
)
inline

Continue a payment transaction with required information

Parameters
paymentGatewayIdPaymentGatewayId returned from OpenPaymentGateway
chanIdChanId returned from StartPaymentTransaction
requiredInfoDictionary of names/values of required information
neDelegate to receive notify events
ptcDelegate to be called when transaction completes
Returns

◆ StartEmailPaymentReceipt()

bool CWSWrapper.CWS.StartEmailPaymentReceipt ( EmailPaymentArgs  args,
NotifyCWSEvent  ne,
PaymentTransactionComplete  ptc 
)
inline

Email a receipt.

Parameters
argsEmailPaymentArgs
neDelegate to receive notify events
ptc
Returns

◆ StartExtraChargeCalculation()

bool CWSWrapper.CWS.StartExtraChargeCalculation ( CalculateExtraChargeArgs  pargs,
NotifyCWSEvent  ne,
PaymentTransactionComplete  pc 
)
inline

Kick off extra charge calculation process.

Parameters
pargsAn object that specifies the required and optional parameters
neA delegate to receive informational messages
pcA delegate to be called when the transaction is complete
Returns
A bool to indicate successful starting of the calculation of extra charge

◆ StartFilePaymentReceipt()

bool CWSWrapper.CWS.StartFilePaymentReceipt ( PrintPaymentArgs  args,
NotifyCWSEvent  ne,
PaymentTransactionComplete  ptc 
)
inline

Start a print receipt to file

Parameters
argsPrintPaymentArgs
neDelegate to receive notify events
ptcDelegate to be called when complete
Returns

◆ StartHandleBinLookupResult()

bool CWSWrapper.CWS.StartHandleBinLookupResult ( string  paymentGatewayId,
string  chanId,
HandleBinLookupResultInfo  handleBinLookupResultInfo,
NotifyCWSEvent  ne,
PaymentTransactionComplete  ptc 
)
inline

Handle a bin lookup result and continue a payment transaction with relevant information

Parameters
paymentGatewayIdPaymentGatewayId returned from OpenPaymentGateway
chanIdChanId returned from StartPaymentTransaction
handleBinLookupResultInfoInformation for continuing the transaction
neDelegate to receive notify events
ptcDelegate to be called when transaction completes
Returns

◆ StartLinkedRefund()

bool CWSWrapper.CWS.StartLinkedRefund ( String  paymentGatewayId,
String  origTransId,
String  tenderType,
String  cardType,
Money  amount,
String  note,
NotifyCWSEvent  ne,
PaymentTransactionComplete  bec 
)
inline

Start a linked refund

Parameters
paymentGatewayIdId retunred from openPaymentGateway
origTransIdThe transaction id for the transaction you want to refund
tenderTypeType of tender
cardTypeThe card type
amountAmount to be refunded
noteOptional note
neNotifiction callback
becDelegate to be called when complete
Returns

◆ StartPaymentTransaction()

bool CWSWrapper.CWS.StartPaymentTransaction ( PaymentArgs  pargs,
NotifyCWSEvent  ne,
PaymentTransactionComplete  pc 
)
inline

Kick off a payment transaction.

Parameters
pargsAn object that specifies the required and optional parameters
neA delegate to receive informational messages
pcA delegate to be called when the transaction is complete
Returns
A bool to indicate successful starting of the transaction

◆ StartPrintPaymentReceipt()

bool CWSWrapper.CWS.StartPrintPaymentReceipt ( PrintPaymentArgs  args,
NotifyCWSEvent  ne,
PaymentTransactionComplete  ptc 
)
inline

Start printing a receipt.

CWS can print the receipt for the most recent transaction or a transaction by transactionId.

If PrintPaymentArgs.transactionId is null, the most recent transaction will be printed.

Parameters
argsPrintPaymentArgs contain optional arguments
neNotification callback method
ptcDelegate to be called when printing is complete
Returns
Bool indicating receipt printing has started

◆ StartTipAdjust()

bool CWSWrapper.CWS.StartTipAdjust ( String  paymentGatewayId,
String  origTransId,
Money  tipAmount,
bool  verifyTipAdjustByIssuer,
NotifyCWSEvent  ne,
PaymentTransactionComplete  bec 
)
inline

Start a tip adjust

Parameters
paymentGatewayIdId returned from openPaymentGateway
origTransIdThe transaction id for the transaction you want to tip adjust
tipAmountTip amount to be applied to the transaction
verifyTipAdjustByIssuerFlag indicating if the transaction should be authorized by issuer
neNotifiction callback
becDelegate to be called when complete
Returns

◆ StartTransactionSearch()

bool CWSWrapper.CWS.StartTransactionSearch ( TransactionSearchArgs  ts_args,
NotifyCWSEvent  ne,
TransactionSearchComplete  tsc 
)
inline

Search for transactions based on passed in search criteria

Parameters
ts_argsThe search criteria
neNotify callback
tscDelegate to be called when the search is complete
Returns

◆ StartValidateAccount()

bool CWSWrapper.CWS.StartValidateAccount ( String  paymentGatewayId,
NotifyCWSEvent  ne,
PaymentTransactionComplete  ptc 
)
inline

Start a validate account

Parameters
paymentGatewayIdPaymentGatewayId
neDelegate to be called for notify events
ptcDelegate to be called when complete
Returns

◆ Stop()

void CWSWrapper.CWS.Stop ( )
inline

Undo start.

◆ TipAdjust()

PaymentTransactionResults CWSWrapper.CWS.TipAdjust ( String  paymentGatewayId,
String  origTransId,
Money  tipAmount,
bool  verifyTipAdjustByIssuer,
NotifyCWSEvent  ne 
)
inline

Perform a tip adjust and wait until complete

Parameters
paymentGatewayIdId returned from openPaymentGateway
origTransIdThe transaction id for the transaction you want to tip adjust
tipAmountTip amount to be applied to the transaction
verifyTipAdjustByIssuerFlag indicating if the transaction should be authorized by issuer
neNotificaion callback
Returns
PaymentTransactionResults

◆ TransactionSearch()

TransactionSearchResults CWSWrapper.CWS.TransactionSearch ( TransactionSearchArgs  ts_args,
NotifyCWSEvent  ne 
)
inline

Search for transaction and wait until complete

Parameters
ts_argsThe search criteria
neNotify callback
Returns
TransactionSearchResults

◆ ValidateAccount()

PaymentTransactionResults CWSWrapper.CWS.ValidateAccount ( String  paymentGatewayId,
NotifyCWSEvent  ne 
)
inline

Validate account and wait until complete

Parameters
paymentGatewayIdPaymentGatewayId
neDelegate to be called for notify events
Returns

Property Documentation

◆ DelayMillis

int CWSWrapper.CWS.DelayMillis
getset

Get/Set delay between polls to CWS

◆ MaxWaitMillis

int CWSWrapper.CWS.MaxWaitMillis
getset

Get/Set maximun transaction time, in milliseconds

◆ URL

string CWSWrapper.CWS.URL
getset

Get/Set URL of CWS


The documentation for this class was generated from the following file: