-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added: EBT Wic (eWic), Gift Card, Fraud Submit. Introduced AvsResultT…
…ype, which may break current implementations. API implementation complete.
- Loading branch information
Showing
9 changed files
with
954 additions
and
17 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
using System; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace CardknoxApi.Operations | ||
{ | ||
/// <summary> | ||
/// The Sale command is used to make a purchase on an EBTW cardholder's cash benefit account. | ||
/// </summary> | ||
public class EBTWSale : Sale | ||
{ | ||
internal string Operation => "ebtw:sale"; | ||
|
||
/// <summary> | ||
/// Items included in the sale transaction operation | ||
/// </summary> | ||
public EBTWItems Items { get; set; } | ||
} | ||
/// <summary> | ||
/// The Cash Balance enables a cash withdrawal from on an EBTW cardholder's cash benefit account. | ||
/// </summary> | ||
public class EBTWBalance : OperationBase | ||
{ | ||
internal string Operation => "ebtw:balance"; | ||
} | ||
/// <summary> | ||
/// Void a transaction | ||
/// </summary> | ||
public class EBTWVoid : OperationBase | ||
{ | ||
internal string Operation => "ebtw:void"; | ||
|
||
/// <summary> | ||
/// Used to reference a previous transaction when doing a follow-up transaction, typically a refund, void, or capture. (Note: xRefnum can be a 64-bit number and should be stored as BIGINT, Long, Int64 or String) | ||
/// </summary> | ||
public string RefNum { get; set; } | ||
} | ||
/// <summary> | ||
/// | ||
/// </summary> | ||
public class EBTWItems : IEnumerable<EBTWItem> | ||
{ | ||
private List<EBTWItem> _items = new List<EBTWItem>(); | ||
|
||
public int Count => _items.Count; | ||
public void Add(EBTWItem item) => _items.Add(item); | ||
|
||
public IEnumerator<EBTWItem> GetEnumerator() | ||
{ | ||
return _items.GetEnumerator(); | ||
} | ||
|
||
IEnumerator IEnumerable.GetEnumerator() | ||
{ | ||
return this.GetEnumerator(); | ||
} | ||
} | ||
/// <summary> | ||
/// | ||
/// </summary> | ||
public class EBTWItem | ||
{ | ||
/// <summary> | ||
/// Unit price for item specified in xUPC | ||
/// </summary> | ||
public decimal UnitPrice { get; set; } | ||
/// <summary> | ||
/// Quantity of item specified in xUPC. | ||
/// </summary> | ||
public int Qty { get; set; } | ||
/// <summary> | ||
/// Universal Product Code. | ||
/// </summary> | ||
public string Upc { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace CardknoxApi.Operations | ||
{ | ||
/// <summary> | ||
/// The Submit command is used in conjunction with a valid FraudWatch account to submit ecommerce transactions for a fraud verification check. | ||
/// </summary> | ||
public class FraudSubmit : Sale | ||
{ | ||
internal string Operation => "fraud:submit"; | ||
|
||
/// <summary> | ||
/// Masked Card number with BIN and last 4 digits exposed | ||
/// </summary> | ||
public new string CardNum { get; set; } | ||
|
||
/// <summary> | ||
/// Transaction RefNum received from Gateway for FraudWatch verification. | ||
/// </summary> | ||
public string GatewayRefNum { get; set; } | ||
/// <summary> | ||
/// Transaction status received from gateway for FraudWatch verification. | ||
/// </summary> | ||
public StatusType GatewayResult { get; set; } | ||
/// <summary> | ||
/// CVV for for FraudWatch verification. (M or N) | ||
/// </summary> | ||
public string GatewayCVV { get; set; } | ||
/// <summary> | ||
/// Street Address for FraudWatch verification. | ||
/// </summary> | ||
public AvsResponseType GatewayAVS { get; set; } | ||
/// <summary> | ||
/// Transaction RefNum received from Gateway for FraudWatch verification. | ||
/// </summary> | ||
public string GatewayError { get; set; } | ||
/// <summary> | ||
/// Specifies if the order origin is Internet OR Phone for FraudWatch verification. | ||
/// </summary> | ||
public OrderType OrderType { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace CardknoxApi.Operations | ||
{ | ||
/// <summary> | ||
/// The Issue command is used to issue funds to a Cardknox gift card. | ||
/// </summary> | ||
public class GCIssue : Sale | ||
{ | ||
internal string Operation => "gift:issue"; | ||
} | ||
/// <summary> | ||
/// The Redeem command is used to debit funds from a Cardknox gift card. | ||
/// </summary> | ||
public class GCRedeem : Sale | ||
{ | ||
internal string Operation => "gift:redeem"; | ||
} | ||
/// <summary> | ||
/// The Balance command is used to check the available balance on a Cardknox gift card. | ||
/// </summary> | ||
public class GCBalance : Sale | ||
{ | ||
internal string Operation => "gift:balance"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters