You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: You may either pass a CardNum with a CVV and an expiration date OR pass a TokenOR pass the raw card data (as MagStripe). The API will not accept multiple.
The order of preference for the API wrapper:
Card Number, Expiration Date, CVV (optional)
Token
Mag Stripe.
usingCardknoxApi;usingCardknoxApi.Operations;CCSalesave=newCCSale{CardNum="4444333322221111",CVV="123",// optional, requirement determined by software security settingsExp="1222"// Expiration Date: MMyy};Cardknoxc=newCardknox(newCardknoxRequest("CardknoxKey","SoftwareName","SoftwareVersion"));CardknoxResponseresp=c.CCSale(sale);if(resp.HasError)thrownewException(resp.Error);stringtransactionId=resp.RefNum;// Always returned regardless of outcomeStatusTypestatus=resp.Status;// Approved, Declined, ErrorResultTyperesult=resp.Result;// A, D, EstringcardNum=resp.MaskedCardNumber;// eg 4xxxxxxxxxxx1111stringtoken=resp.Token;// Token returned for use with future transaction.CardTypecardType=resp.CardType;// Visa, Discover, etc