1710 Apollo Court, Seal Beach, CA 90740
(562) 546-6400 oemsolutions@magtek.com

Decrypt and Forward

Documentation
Decrypt and Forward
Decrypt and Forward (local copy)

URL:
DAF Pilot URL
DAF Production URL

Error Codes:
Decrypt & Forward:
ID Description
601 EncryptedData is required
602 KSN is required
603 CustomerCode is required
604 Username is required
605 Password is required
606 EncryptedData is not valid
607 KSN is not valid
608 DataToMac is required
609 KeyName is Required
610 Track2 is required
611 MagnePrint is required
612 Track2 is not valid
613 MagnePrint is not valid
614 MagnePrint Status is required
615 CustomerTransactionID is not valid
616 BillingLable is not valid
701 Access Denied
702 Device Not Allowed
703 Replay Prevented
704 Invalid command type for this operation
705 No Records found
706 KSID Access Denied
707 Payload is required
708 EncryptionType is required
711 GetResponse FaultExeption
712 Decrypt web service failed
714 Decrypt web service exception
715 Decrypt web service failed. DecryptCardSwipeResponse is null
716 Invalid Track data after Decryption
717 Track2 data is empty after Decryption
718 Pan is empty after Decryption
719 MMYYCCExpdt data is empty after Decryption
720 Track2 is empty after Decryption
721 Payload post failed
722 URI is not authorized
723 CCCardType is empty
724 The closing parenthesis not found, Should be $Substring(string, startindex, length)
725 The starting parenthesis not found. Should be $Substring(string, startindex, length)
726 Invalid number of parameter. Should be $Substring(string,startindex,length)
727 Invalid startIndex parameter type. Should be numeric.
728 Invalid length parameter type. Should be numeric greater than 0.
729 Invalid length parameter.
730 RemoveCondition format is incorrect for RemoveCondition
731 Syntax Error.
732 Syntax Error. Invalid Operand type.
734 Error. Syntax error in $Replace. The closing parenthesis not found
735 Error. Syntax error in $Replace. The starting parenthesis not found
736 Error. Syntax error in $Replace. Invalid number of parameter
737 Error. Syntax error in $Replace. Parameter 2 should not be empty
738 Invalid EMV SREDData.
739 Invalid EMV SREDData. Ksn is not Found.
741 Invalid EMV SREDData. Encryption Type is not Found.
742 Invalid EMV SREDData. Paddedbytes is not Found.
743 Invalid EMV SREDData. Data is Null or not Found.
1000 Transaction Successfully Processed
5000 Unknown Error


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

Dim Client As New DAF.DecryptAndForwardClient("BasicHttpsBinding_IDecryptAndForward")
Dim CardSwipeReq As New DAF.ProcessCardSwipeRequest()
Dim CardSwipeResp As New DAF.ProcessCardSwipeResponse()
Dim Auth As New DAF.Authentication()
Dim EncSwipe As New DAF.EncryptedCardSwipe()
Dim PayLoad As New System.Text.StringBuilder()
Dim Payloadinfo As New DAF.PayloadInfo()

System.Net.ServicePointManager.SecurityProtocol = Net.SecurityProtocolType.Tls12

Auth.CustomerCode = "001000000"
Auth.Password = "password"
Auth.Username = "MAGUSER"
CardSwipeReq.Authentication = Auth

CardSwipeReq.BillingLabel = "Test"
CardSwipeReq.CustomerTransactionID = "100"
EncSwipe.DeviceSN = "B2C82CB041015AA"
EncSwipe.KSN = "9011880B2C82CB000018"
EncSwipe.MagnePrint = "59C671FD7DE83CA310B49EE981B674F034953611E8E4288865C53CBFA4317DC6C5DF9708E7D9D19E1A876FBDE37596E6895FC1A0CDEA48E6|B2C82CB041015AA"
EncSwipe.MagnePrintStatus = "61400200"
EncSwipe.Track1 = "8BDBB7DDA41A106E89157F143A04E11E924688BC4213EE25204BF7FB46006044BA098BFFB2608A40D94FCD9610B12365EA4FE0762359FAC4"
EncSwipe.Track2 = "40A1B5D71ABFC88E677E6557E0D9D958AEBF1763F2D799D28858A93D69E765B0C729FAC25EAD93DB"
EncSwipe.Track3 = ""
CardSwipeReq.EncryptedCardSwipe = EncSwipe

PayLoad.Append("MAGNEFLEX

{BillingAddress}
{BillingCity}{BillingCountry}{BillingEmail}{BillingPhone}") PayLoad.Append("99999{BillingState}{MM}{YY}{CCName}{CCNum}{CVV}") PayLoad.Append("V32YHV{DeviceID}JetPay{SubtotalAmount}{TipAmount}POS{Password}") PayLoad.Append("MAGNETIC STRIPE
{ShippingAddress}
{ShippingCity}{ShippingCountry}{PurchaseOrder}{ShippingEmail}{ShippingName}{ShippingPhone}") PayLoad.Append("{ShippingZIP}{ShippingMethod}{ShippingState}
{TaxAmount}TESTMCC5111X100%{CCTrack1}?") PayLoad.Append(";{CCTrack2}?GHC3XO9P72YZP-KB49SALE]]>")

Payloadinfo.Payload = PayLoad.ToString()
Payloadinfo.Uri = "www.test.com"

CardSwipeReq.PayloadInfo = Payloadinfo

Try
CardSwipeResp = Client.ProcessCardSwipe(CardSwipeReq)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

End Sub