{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"2bf1bb52-67d4-4ceb-b948-28ae7a36f37a","name":"Decrypt and Forward (DAF)","description":"# Additional References:\n\nGithub resources: [https://github.com/Magensa/DAFv4](https://github.com/Magensa/DAFv4)\n\nPlayground: [https://demo.magensa.net/Dafplayground/ClientApp/build](https://demo.magensa.net/Dafplayground/ClientApp/build)\n\nEndpoint URLs:\n\n| Uri | Method | Description |\n| --- | --- | --- |\n| /ProcessCardSwipe | [POST](https://svc1.magensa.net/pilot-dafv4/Service.svc/JSON/help/operations/ProcessCardSwipe) | Service at [https://svc1.magensa.net/Pilot-DAFV4/Service.svc/JSON/ProcessCardSwipe](https://svc1.magensa.net/Pilot-DAFV4/Service.svc/JSON/ProcessCardSwipe) |\n| /ProcessData | [POST](https://svc1.magensa.net/pilot-dafv4/Service.svc/JSON/help/operations/ProcessData) | Service at [https://svc1.magensa.net/Pilot-DAFV4/Service.svc/JSON/ProcessData](https://svc1.magensa.net/Pilot-DAFV4/Service.svc/JSON/ProcessData) |\n| /ProcessGooglePay | [POST](https://svc1.magensa.net/pilot-dafv4/Service.svc/JSON/help/operations/ProcessGooglePay) | Service at [https://svc1.magensa.net/Pilot-DAFV4/Service.svc/JSON/ProcessGooglePay](https://svc1.magensa.net/Pilot-DAFV4/Service.svc/JSON/ProcessGooglePay) |\n| /ProcessInAppApplePay | [POST](https://svc1.magensa.net/pilot-dafv4/Service.svc/JSON/help/operations/ProcessInAppApplePay) | Service at [https://svc1.magensa.net/Pilot-DAFV4/Service.svc/JSON/ProcessInAppApplePay](https://svc1.magensa.net/Pilot-DAFV4/Service.svc/JSON/ProcessInAppApplePay) |\n| /ProcessTECApplePay | [POST](https://svc1.magensa.net/pilot-dafv4/Service.svc/JSON/help/operations/ProcessTECApplePay) | Service at [https://svc1.magensa.net/Pilot-DAFV4/Service.svc/JSON/ProcessTECApplePay](https://svc1.magensa.net/Pilot-DAFV4/Service.svc/JSON/ProcessTECApplePay) |\n| /ProcessToken | [POST](https://svc1.magensa.net/pilot-dafv4/Service.svc/JSON/help/operations/ProcessToken) | Service at [https://svc1.magensa.net/Pilot-DAFV4/Service.svc/JSON/ProcessToken](https://svc1.magensa.net/Pilot-DAFV4/Service.svc/JSON/ProcessToken) |\n\n# Purpose of the document\n\nThe purpose of this document is to provide a description of how to call operations of the Magensa Decrypt and Forward 4.0 Web Services.\n\nEffective use of the Decrypt and Forward Web Services enables users to easily integrate encrypted card swipe data into a payment application where the payment application traditionally transmits unencrypted card swipe data when calling web services for a third-party (or ‘target’) service provider.\n\nUsers can send Magensa the encapsulated XML (SOAP) or key-value pairs for the third-party service provider, along with encrypted card swipe data from a MagTek MagneSafe reader, and Magensa will decrypt the card swipe data and insert the relevant data, including the unencrypted card data, into the target XML or key-value pairs and call the third-party service provider on behalf of the user. This process will allow a user to support encrypted card swipe data in their payment application without the third-party service provider supporting a decryption service.\n\n<img src=\"https://content.pstmn.io/55624957-5183-45b0-9fd4-d9fb5ffc3372/ZGFmMS5wbmc=\">\n\nFigure 1 - Decrypt and Forward\n\nExamples of third-party service providers to use with Decrypt and Forward:\n\n- Payment processors\n    \n- Tokenization services\n    \n- Card fraud alert services\n    \n- Gift card processors\n    \n- Credit check services\n    \n- Special-purpose gateways (EBT, procurement card, etc)\n    \n\nThe Decrypt and Forward Web Service works by decrypting data from a MagneSafe encrypted card swipe and placing the appropriate decrypted data into the target XML or key-value pairs. This is accomplished by using “field replacement variables” that are inserted in-line into the payload. For instance, a target web service might accept a card Primary Account Number (PAN) as an input using the following tag:\n\nTo instruct Magensa to place the decrypted PAN from the card swipe into this tag, the field replacement variable `{CCNum}` would be used as follows: `{CCNum}`\n\nVariables\n\n1. `{DecryptedData}`\n    \n2. `{CCName}`\n    \n3. `{CCNum}`\n    \n4. `{CCTrack1}`\n    \n5. `{CCTrack1Length}`\n    \n6. `{CCTrack2}`\n    \n7. `{CCTrack2Length}`\n    \n8. `{CCardType}`\n    \n9. `{KSN}`\n    \n10. `{MMYYCCExpdt}`\n    \n11. `{MM_YYCCExpdt}`\n    \n12. `{DD}`\n    \n13. `{MM}`\n    \n14. `{YY}`\n    \n15. `{YYYY}`\n    \n16. `{DecryptedBlob}`\n    \n\nAdditional variables will be added from time-to-time. If a particular card data element is required for the target web service you wish to use, please contact [support@magensa.net](https://mailto:support@magensa.net) to submit a request to have it added to the service.\n\nA unique, new feature introduced in Decrypt and Forward 4.0 is the ability to send a “batch” of requests in a single call to the service. As a result, all Decrypt and Forward 4.0 service operations take in an array of requests and return an array of responses. The service processes these input requests serially and a specific index/element of response corresponds to the specific index/element of request. All responses have a DecryptForwardFaultException element and in the case of an error or exception raised for that\n\nparticular request, the details will be available in the corresponding DecryptForwardFaultException element. When successful, the value of this DecryptForwardFaultException element will be null.\n\nThe Decrypt and Forward Web Services do not rely on a pre-existing integration between Magensa and the third-party service provider. As long as the third-party service provider uses web services, and Magensa can call those web services on behalf of the user, the third-party service can be used.\n\nIn the case where the user has never integrated to the third-party service provider before, it is recommended for the user to integrate to the Decrypt and Forward Web Services first, and then certify to the target third-party service provider with Decrypt and Forward in-place.\n\nIn order for Magensa to call the third-party service provider, consideration must be given to the following:\n\n- Whether Magensa’s IP addresses and domain names must be whitelisted with the third-party\n    \n- Whether client and/or server-side certificates are required.\n    \n\nInformation in this document is subject to change without notice. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Magensa LLC.\n\n# Decrypt and Forward Version 4.0 Operations\n\n## ProcessCardSwipe\n\nA command used to decrypt and forward a processed card swipe.\n\n### Input Properties\n\n| Property(\\*) | Value | Value Description |\n| --- | --- | --- |\n| AdditionalRequestData | Array of key / value | Contains custom request data required by the target service provider. Elements are expressed as key/value pairs grouped under . See sample request. |\n| CustomerCode \\* | String | Customer code for credential assigned by Magensa |\n| Password \\* | String | Password for credential assigned by Magensa |\n| Username \\* | String | Username for credential assigned by Magensa |\n| BillingLabel | String | Billing label |\n| CustomerTransactionId | String | Client-assigned transaction ID for easy cross-reference |\n| EncryptedCardSwipe | String | Container for magnetic stripe card data. This container is optional. EncryptedCardSwipe and all the following properties within shall be omitted if an encrypted card swipe is not available: IsReturnCardID, DeviceSN, KSN, MagnePrint, MagnePrintStatus, Track1, Track2, and Track3. |\n| IsReturnCardID | Boolean | Flag indicating whether the value of CardID is returned from Magensa  <br>  <br>0 = (false)  <br>  <br>1 = (true) |\n| DeviceSN | String | Device serial number |\n| KSN \\* | String | Key serial number of the device |\n| MagnePrint \\* | String | Encrypted MagnePrint |\n| MagnePrintStatus \\* | String | MagnePrint status |\n| Track1 | String | Encrypted track1 data |\n| Track2 \\* | String | Encrypted track2 data |\n| Track3 | String | Encrypted track3 data |\n| AdditionalPayloadInfoData | Array of key / value | Contains custom request data required by the target service provider. Elements are expressed as key/value pairs grouped under See sample request. |\n| Base64ClientCert | String | Client certificate to accessing the targeted web service formatted in base64 |\n| ClientCertPassword | String | Client certificate password |\n| AdditionalHTTPInfoData | Array of key / value | Contains custom request data required by the target service provider. Elements are expressed as key/value pairs grouped under . See sample request. |\n| Headers | Array of key / value | Contains custom HTTP headers required by the target web service. Elements are expressed as key/value pairs grouped under . See examples. |\n| NetworkProtocolType | String | Network protocol to use when forwarding the payload to the processor:  <br>  <br>HTTP  <br>  <br>TCPIP |\n| Payload \\* | String | Payload data  <br>  <br>Example: |\n| AccessEngineHeaderHex | String | Access engine header in base64 format |\n| AdditionalTCPIPInfoData | Array of key / value | Contains custom request data required by the target service provider. Elements are expressed as key/value pairs grouped under . See sample request. |\n| NumberOfBytesToAddForLength \\* | Integer | This field may be required by some processors. If it is not 0, the defined number of bytes are added in front of the TCPIP message. Then the total length of the TCPIP binary message is calculated and written into those bytes. The value should be defined in the processor documentation, usually should be 2. Set to 0 when NetworkProtocolType is HTTP. |\n| Port \\* | Integer | This is the TCPIP port number. Set to 0 when NetworkProtocolType is HTTP. |\n| Uri \\* | String | Address to forward the payload |\n\nNote: \\* = Required\n\n### Output Properties\n\n| Property | Value | Value Description |\n| --- | --- | --- |\n| AdditionalOutputData | Array of key / value | Contains additional output data returned by the target web service. Elements are expressed as key/value pairs grouped under . See examples. |\n| CardID | String | Card ID from Magensa |\n| IsReplay | String | Boolean value indicating prior use of KSN from Magensa |\n| MagnePrintScore | String | MagnePrint score |\n| CustomerTransactionId | String | Client-assigned transaction ID for easy cross-reference |\n| DecryptForwardFaultException | String | Contains a fault exception returned by the target web service. Elements are expressed as Code and Message. |\n| MagTranId | String | Magensa assigned unique transaction ID in GUID form. |\n| PayloadResponse | String | Response from the Uri input |\n| PayloadToken | String | Payload token |\n| TransactionUTCTimestamp | String | Transaction timestamp from Magensa |\n\nThe Web Services Description Language URL for consuming this web service may be located at:\n\n[https://daf.magensa.net/v4/Service.svc?singleWsdl](https://daf.magensa.net/v4/Service.svc?singleWsdl)\n\n## ProcessData\n\nA command used to process and forward a transaction. The transaction may be encrypted, non-encrypted, TLV encoded, or not TLV encoded based on the input properties.\n\n### Input Properties\n\n| Property(\\*) | Value | Value Description |\n| --- | --- | --- |\n| AdditionalRequestData | Array of key / value | Contains custom request data required by the target service provider. Elements are expressed as key/value pairs grouped under . See sample request. |\n| CustomerCode \\* | String | Customer code for credential assigned by Magensa |\n| Password \\* | String | Password for credential assigned by Magensa |\n| Username \\* | String | Username for credential assigned by Magensa |\n| BillingLabel | String | Billing label |\n| CustomerTransactionId | String | Client-assigned transaction ID for easy cross-reference |\n| Data \\* | String | Transaction data to be sent to the processor |\n| DataFormatType | String | Format for Data:  <br>  <br>TLV  <br>  <br>NONE |\n| EncryptionType \\* | String | Encryption type used for Data when Data is encrypted:  <br>  <br>80 = (DUKPT Key Data Variant)  <br>  <br>81 = (DUKPT Key PIN Variant) |\n| KSN \\* | String | Key serial number of the device. |\n| NumberOfPaddedBytes \\* | Integer | Number of bytes padded to the end of the decrypted EMVSREDData to make a multiple of 8 bytes. |\n| IsEncrypted | Boolean | Flag indicating whether Data is encrypted:  <br>  <br>0 = (false and default if not present)  <br>  <br>1 = (true) |\n| AdditionalPayloadInfoData | Array of key / value | Contains custom request data required by the target service provider. Elements are expressed as key/value pairs grouped under . See sample request. |\n| Base64ClientCert | String | Client certificate to accessing the targeted web service formatted in base64 |\n| ClientCertPassword | String | Client certificate password |\n| AdditionalHTTPInfoData | Array of key / value | Contains custom request data required by the target service provider. Elements are expressed as key/value pairs grouped under . See sample request. |\n| Headers | Array of key / value | Contains custom HTTP headers required by the target web service. Elements are expressed as key/value pairs grouped under . See examples. |\n| NetworkProtocolType | String | Network protocol to use when forwarding the payload to the processor:  <br>  <br>HTTP  <br>  <br>TCPIP |\n| Payload \\* | String | Payload data  <br>  <br>Example: |\n| AccessEngineHeaderHex | String | Access engine header in base64 format |\n| AdditionalTCPIPInfoData | Array of key / value | Contains custom request data required by the target service provider. Elements are expressed as key/value pairs grouped under . See sample request. |\n| NumberOfBytesToAddForLength \\* | Integer | This field may be required by some processors. If it is not 0, the defined number of bytes are added in front of the TCPIP message. Then the total length of the TCPIP binary message is calculated and written into those bytes. The value should be defined in the processor documentation, usually should be 2. Set to 0 when NetworkProtocolType is HTTP. |\n| Port \\* | Integer | This is the TCPIP port number. Set to 0 when NetworkProtocolType is HTTP. |\n| Uri \\* | String | Address to forward the payload |\n\nNote: \\* = Required\n\n### Output Properties\n\n| Property | Value | Value Description |\n| --- | --- | --- |\n| CustomerTransactionId | String | Client-assigned transaction ID for easy cross-reference |\n| AdditionalOutputData | Array of key / value | Contains additional output data returned by the target web service. Elements are expressed as key/value pairs grouped under . See examples. |\n| CardID | String | Card ID from Magensa |\n| IsReplay | Boolean | Boolean value indicating prior use of KSN from Magensa |\n| DecryptForwardFaultException | String | Contains a fault exception returned by the target web service. Elements are expressed as Code and Message. |\n| MagTranId | String | Magensa assigned unique transaction ID in GUID form. |\n| PayloadResponse | String | Response from the Uri input |\n| PayloadToken | String | Payload token |\n| TransactionUTCTimestamp | String | Transaction timestamp from Magensa |\n\nThe Web Services Description Language URL for consuming this web service may be located at:\n\n[https://daf.magensa.net/v4/Service.svc?singleWsdl](https://daf.magensa.net/v4/Service.svc?singleWsdl)\n\n## ProcessToken\n\nA command used to process a token.\n\n### Input Properties\n\n| Property(\\*) | Value | Value Description |\n| --- | --- | --- |\n| AdditionalRequestData | Array of key / value | Contains custom request data required by the target service provider. Elements are expressed as key/value pairs grouped under . See sample request. |\n| CustomerCode \\* | String | Customer code for credential assigned by Magensa |\n| Password \\* | String | Password for credential assigned by Magensa |\n| Username \\* | String | Username for credential assigned by Magensa |\n| BillingLabel | String | Billing label |\n| CustomerTransactionId | String | Client-assigned transaction ID for easy cross-reference |\n| AdditionalPayloadInfoData | Array of key / value | Contains custom request data required by the target service provider. Elements are expressed as key/value pairs grouped under . See sample request. |\n| Base64ClientCert | String | Client certificate to accessing the targeted web service formatted in base64 |\n| ClientCertPassword | String | Client certificate password |\n| AdditionalHTTPInfoData | Array of key / value | Contains custom request data required by the target service provider. Elements are expressed as key/value pairs grouped under . See sample request. |\n| Headers | Array of key / value | Contains custom HTTP headers required by the target web service. Elements are expressed as key/value pairs grouped under . See examples. |\n| NetworkProtocolType | String | Network protocol to use when forwarding the payload to the processor:  <br>  <br>HTTP  <br>  <br>TCPIP |\n| Payload \\* | String | Payload data  <br>  <br>Example: |\n| AccessEngineHeaderHex | String | Access engine header in base64 format |\n| AdditionalTCPIPInfoData | Array of key / value | Contains custom request data required by the target service provider. Elements are expressed as key/value pairs grouped under . See sample request. |\n| NumberOfBytesToAddForLength \\* | Integer | This field may be required by some processors. If it is not 0, the defined number of bytes are added in front of the TCPIP message. Then the total length of the TCPIP binary message is calculated and written into those bytes. The value should be defined in the processor documentation, usually should be 2. Set to 0 when NetworkProtocolType is HTTP. |\n| Port \\* | Integer | This is the TCPIP port number. Set to 0 when NetworkProtocolType is HTTP. |\n| Uri \\* | String | Address to forward the payload |\n\nNote: \\* = Required\n\n### Output Properties\n\n| Property | Value | Value Description |\n| --- | --- | --- |\n| AdditionalProcessTokenResponseData | Array of key / value | A group that contains additional output data returned by the target web service. Elements are expressed as Key/Value pairs grouped under . See examples. |\n| CustomerTransactionId | String> | Client-assigned transaction ID for easy cross-reference |\n| DecryptForwardFaultException | String | Contains a fault exception returned by the target web service. Elements are expressed as Code and Message. |\n| MagTranId | String | Magensa assigned unique transaction ID in GUID form |\n| PayloadResponse | String | Response from the Uri input |\n| PayloadToken | String | Hexadecimal format |\n| TransactionUTCTimestamp | String | Transaction timestamp from Magensa |\n\nThe Web Services Description Language URL for consuming this web service may be located at:\n\n[https://daf.magensa.net/v4/Service.svc?singleWsdl](https://daf.magensa.net/v4/Service.svc?singleWsdl)\n\n# Status Codes and Messages\n\nStatus Codes and Messages returned by Magensa for Decrypt and Forward 4.0 web service operations.\n\nInternal errors\n\n| Code | Message |\n| --- | --- |\n| 5000 | Unknown Error |\n\nInput Validation errors\n\n| Code | Message |\n| --- | --- |\n| 602 | KSN is required |\n| 603 | CustomerCode is required |\n| 604 | Username is required |\n| 605 | Password is required |\n| 607 | KSN is not valid |\n| 610 | EncryptedTrack2 is required |\n| 611 | MagnePrint is required |\n| 614 | MagnePrint status is required |\n| 673 | ProcessCardSwipe Inputs is required |\n| 674 | ProcessDataInputs is required |\n| 675 | ProcessToken Inputs is required |\n| 676 | HTTP Info is required when NetworkProtocolTypes is HTTP |\n| 677 | Invalid Network Protocol Type |\n| 701 | Access Denied |\n| 707 | Payload is required |\n| 708 | EncryptionType is required |\n| 711 | GetResponse FaultException |\n| 712 | Decrypt web service failed |\n| 714 | Decrypt web service exception |\n| 715 | Decrypt web service failed. DecryptCardSwipeResponse is null |\n| 716 | Invalid Track data after Decryption |\n| 721 | Payload post failed |\n| 722 | URI is not authorized |\n| 733 | Error parsing TLVData |\n| 738 | Invalid EMVSREDData |\n| 754 | Error in Base64-Client-Cert |\n| 755 | TCP Info is required |\n| 756 | EncryptionInfo is required |\n\n# Template Functions\n\nThe following functions can be used in conjunction with field variables in order to build processor payloads request. A space is not needed between commas which delimit the parameters, unless specifically need as part of the parameter. All parameters shall not be enclosed in quotations (“”).\n\n## $Add()\n\nThis function adds two numbers.\n\n$Add(Operand1_Numeric,Operand2_Numeric,ToStringFormat_Optional)\n\n| Parameter | Value | Value Description |\n| --- | --- | --- |\n| Operand1_Numeric | Numeric | Number 1 |\n| Operand2_Numeric | Numeric | Number 2 |\n| ToStringFormat_Optional | String | Optional output string format specifier |\n\nReturn Value:\n\nThe numeric sum of Operand1_Numeric and Operand2_Numeric.\n\n## $DateTimeNow()\n\nThis function returns the current date and time.\n\n$DateTimeNow(Optional_format,Optional_0_Local_Or_1_Universal)\n\n| Parameter | Value | Value Description |\n| --- | --- | --- |\n| Optional_format | String | Optional standard or custom date and time format string.  <br>  <br>Examples but not limited to:  <br>  <br>yyyyMMddhhmmss – 4 digit year in 12 hour format  <br>  <br>yyMMddHHmmss – 2 digit year in 24 hour format |\n| Optional_0_Local_Or_1_Universal | Integer | Optional flag to return local time or global time.  <br>  <br>0 – Local time  <br>  <br>1 – Global time |\n| Optional_format | String | Optional standard or custom date and time format string.  <br>  <br>Examples but not limited to:  <br>  <br>yyyyMMddhhmmss – 4 digit year in 12 hour format  <br>  <br>yyMMddHHmmss – 2 digit year in 24 hour format |\n\nReturn Value:\n\nA string of the current date and time.\n\n## $DecimalToString()\n\nThis function converts a numeric value to an equivalent string.\n\n$DecimalToString(Operand1_Numeric,ToStringFormat_Optional)\n\n| Parameter | Value | Value Description |\n| --- | --- | --- |\n| Operand1_Numeric | Numeric | Decimal number to convert |\n| ToStringFormat_Optional | String | Optional output string format specifier |\n\nReturn Value:\n\nA string equivalent of the Operand1_Numeric.\n\n## $IndexOf()\n\nThis function finds the position of one string within another.\n\n$IndexOf(string,searchString,startPosition,numberOfCharacterPosition)\n\n| Parameter | Value | Value Description |\n| --- | --- | --- |\n| string | String | The source string |\n| searchString | String | The string to seek. |\n| startPosition | String | The search starting position. |\n| numberOfCharacterPosition | String | The number of character positions to examine. |\n\nReturn Value:\n\nThe zero-based index position of value from the start of the current instance if that string is found, or -1 if it is not. If string is empty, the return value is startPosition.\n\n## $IndexIgnoreCaseOf()\n\nThis function finds the position of one string within another and is case insensitive.\n\n$IndexIgnoreCaseOf(string,searchString,startPosition,numberOfCharacterPosition)\n\n| Parameter | Value | Value Description |\n| --- | --- | --- |\n| string | String | The source string |\n| searchString | String | The string to seek |\n| startPosition | String | The search starting position |\n| numberOfCharacterPosition | String | The number of character positions to examine |\n\nReturn Value:\n\nThe zero-based index position of value from the start of the current instance if that string is found, or -1 if it is not. If string is empty, the return value is startPosition.\n\n## $Length()\n\nThis function returns the number of characters in a string.\n\n$Length(string)\n\n| Parameter | Value | Value Description |\n| --- | --- | --- |\n| string | String | String to count |\n\nReturn Value:\n\nThe string length.\n\n## $Multiply()\n\nThis function multiplies two numbers.\n\n$Multiply(Operand1_Numeric,Operand2_Numeric,ToStringFormat_Optional)\n\n| Parameter | Value | Value Description |\n| --- | --- | --- |\n| Operand1_Numeric | Numeric | Number 1 |\n| Operand2_Numeric | Numeric | Number 2 |\n| ToStringFormat_Optional | String | Optional output string format specifier |\n\nReturn Value:\n\nThe product of Operand1_Numeric and Operand2_Numeric.\n\n## $Replace()\n\nThis function replaces a substring within another string.\n\n$Replace(string,oldValue,newValue)\n\n| Parameter | Value | Value Description |\n| --- | --- | --- |\n| string | String | Source string |\n| oldValue | String | String being sought |\n| newValue | String | New value of string to replace the old value |\n\nReturn Value:\n\nA string of which all instances of an oldValue substring has been replaced with a newValue substring.\n\n## $Substring()\n\nThis function retrieves a substring of the source string.\n\n$Substring(string,startindex,length)\n\n| Parameter | Value | Value Description |\n| --- | --- | --- |\n| string | String | The source string |\n| startindex | Integer | The zero-based starting character position of the string |\n| length | Integer | The number of characters in the substring |\n\nReturn Value:\n\nA string that is equivalent to the substring of specified length.\n\n## $TLVLength()\n\nThis function returns the length of the data portion for a single TLV element string.\n\n$TLVLength(string)\n\n| Parameter | Value | Value Description |\n| --- | --- | --- |\n| string | String | Tag octet of the TLV element  <br>  <br>Example of full TLV:  <br>  <br>When Application PAN TLV=5A081234567890123456, $TLVLength(5A) returns 08  <br>  <br>+--Literal-----------------------------+ |\n\nReturn Value:\n\nThe hexadecimal data length of the TLV element.\n\n## $Trim()\n\nThis function removes leading and trailing spaces from a string.\n\n$Trim(string)\n\n| Parameter | Value | Value Description |\n| --- | --- | --- |\n| string | String | String to trim |\n\nReturn Value:\n\nA string without leading and trailing spaces.\n\n## $RegExIsMatch()\n\nThis function evaluates a regular expression to find a match in the input string.\n\n$RegExIsMatch(InputString,patternString, RegexOptionsStringOptional)\n\n| Parameter | Value | Value Description |\n| --- | --- | --- |\n| InputString | String | Input string to search for a match |\n| patternString | String | Pattern string to match |\n| RegexOptionsStringOptional | String | Optional regular expression options |\n\nReturn Value:\n\n“True” string if the regular expression finds a match, otherwise returns “False”.\n\n## $RegExReplace()\n\nThis function replaces all strings that match a regular expression with a replacement string.\n\n$RegExReplace(InputString,PatternString,ReplacementString,RegexOptionsStringOptional)\n\n| Parameter | Value | Value Description |\n| --- | --- | --- |\n| InputString | String | Input string to search for a match |\n| PatternString | String | Pattern string to match |\n| ReplacementString | String | String to replace a match |\n| RegexOptionsStringOptional | String | Optional regular expression options |\n\nReturn Value:\n\nA new string that is identical to the input string, except that the replacement string takes the place of each matched string. If pattern is not matched, the input string is returned.\n\n## $RegExUnescape()\n\nThis function converts an expression into its unescaped form.\n\n$RegExUnescape(InputString)\n\n| Parameter | Value | Value Description |\n| --- | --- | --- |\n| InputString | String | String containing the text to convert |\n\nReturn Value:\n\nA string of characters with any escaped characters converted to their unescaped form.\n\n## $Iif()\n\nThis function evaluates an expression and returns either a true or false result string.\n\n$Iif(ConditionBool,ResultTrueString,ReturnFalseStringOptional)\n\n| Parameter | Value | Value Description |\n| --- | --- | --- |\n| ConditionBool | Expression | Expression to evaluate |\n| ResultTrueString | Expression | String returned if ConditionalBool evaluates as True |\n| ResultFalseStringOptional | Expression | Optional string returned if ConditionalBool evaluates as False |\n\nReturn Value:\n\nThe True result string if the Boolean condition is true, otherwise the False result string.\n\n## $NotBool()\n\nThis function negates a Boolean value.\n\n$NotBool(OperandBool)\n\n| Parameter | Value | Value Description |\n| --- | --- | --- |\n| OperandBool | Boolean | Boolean to negate |\n\nReturn Value:\n\n“True” string when OperandBool is false. “False” string when OperandBool is true.\n\n## $AndBool()\n\nThis function performs an AND operation on two Boolean values.\n\n$AndBool(Operand1Bool,Operand2Bool)\n\n| Parameter | Value | Value Description |\n| --- | --- | --- |\n| Operand1Bool | Boolean | Boolean value 1 |\n| Operand2Bool | Boolean | Boolean value 2 |\n\nReturn Value:\n\n“True” string when both Operand1Bool and Operand2Bool are true, otherwise returns “False”.\n\n## $OrBool()\n\nThis function performs an OR operation on two Boolean values.\n\n$OrBool(Operand1Bool,Operand2Bool)\n\n| Parameter | Value | Value Description |\n| --- | --- | --- |\n| Operand1Bool | Boolean | Boolean value 1 |\n| Operand2Bool | Boolean | Boolean value 2 |\n\nReturn Value:\n\n“True” string when both Operand1Bool and Operand2Bool are true,\n\n“True” string when either Operand1Bool or Operand2Bool are true, otherwise returns “False”.\n\n## $IsContains()\n\nThis function checks if the source string contains a substring.\n\n$IsContains(String,ContainsString,IgnoreCaseBool)\n\n| Parameter | Value | Value Description |\n| --- | --- | --- |\n| String | String | Source string sought |\n| ContainsString | String | String to seek |\n| IgnoreCaseBool | Boolean | Flag to make the search be case insensitive  <br>  <br>false – Search is case sensitive  <br>  <br>true – Search is case insensitive |\n\nReturn Value:\n\n“True” string when ContainsString is found, otherwise returns “False”.\n\n## $IsEqualStrings()\n\nThis function compares two strings.\n\n$IsEqualStrings(Operand1String,Operand2String,IgnoreCaseBool)\n\n| Parameter | Value | Value Description |\n| --- | --- | --- |\n| Operand1String | String | String to compare |\n| Operand2String | String | String to compare |\n| IgnoreCaseBool | Boolean | Flag to make the search be case insensitive  <br>  <br>false – Search is case sensitive  <br>  <br>true – Search is case insensitive |\n\nReturn Value:\n\n“True” string when Operand1String and Operand2String match, otherwise returns “False”.\n\n## $IsEqualNumbers()\n\nThis function compares for the equality of two numbers.\n\n$IsEqualNumbers(Operand1Number,Operand2Number)\n\n| Parameter | Value | Value Description |\n| --- | --- | --- |\n| Operand1Number | Numeric | Number to compare |\n| Operand2Number | Numeric | Number to compare |\n\nReturn Value:\n\n“True” string when Operand1Number and Operand2Number match, otherwise returns “False”.\n\n## $IsGreaterOrEqual()\n\nThis function compares for the inequality of two numbers.\n\n$IsGreaterOrEqual(Operand1Number,Operand2Number)\n\n| Parameter | Value | Value Description |\n| --- | --- | --- |\n| Operand1Number | Numeric | Number to compare |\n| Operand2Number | Numeric | Number to compare |\n\nReturn Value:\n\n“True” string when Operand1Number is greater than or equal to Operand2Number, otherwise returns “False”.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"33729815","team":6083045,"collectionId":"2bf1bb52-67d4-4ceb-b948-28ae7a36f37a","publishedId":"2sAYdkJVAf","public":true,"publicUrl":"https://daf.developer.magtek.com","privateUrl":"https://go.postman.co/documentation/33729815-2bf1bb52-67d4-4ceb-b948-28ae7a36f37a","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-single-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.10.1","publishDate":"2025-03-05T16:22:45.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/54710abbcbe0595b52ebedcdb464cfaf3ee177ca1c5a5d0850c1dc24c3508caf","favicon":"https://res.cloudinary.com/postman/image/upload/v1741199418/team/2b0e542073ba9f727998a67f8bd10fe7.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://daf.developer.magtek.com/view/metadata/2sAYdkJVAf"}