def processValidExpDate(expDate, serverMode):   
        r"""The ValidExpDate service checks the expiration date to ensure it is valid.   

        Args:    
            expDate (str): The expiration date of the credit card to verify in MMYY format. |br| 
            serverMode (str): Valid values are: PRODUCTION, UAT. |br| 
        Returns:
           TransactionXMLParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """

        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            
        paramStr = {
                    "ExpDate" : expDate
        }
        response = ConnectionHandler.sendHttpPostRequest(paramStr, domain, '/transactservices.svc/ValidExpDate')
        
        if isinstance(response, Exception):
            return response
        elif response is not None and response != "":
            validationResponse = TransactionXMLParser.getValidateExpDateResponse(response)
            return validationResponse;
        else:
            return None  
    def processValidCard(cardNum, expDate, serverMode):
        r"""The ValidCard service operation performs a validation check on a credit card. It checks the card length based on the card type, performs a mod 10 checksum, and checks the expiration date.   

        Args:    
            cardNum (str): The credit card number to verify. |br| 
            expDate (str): The expiration date of the credit card to verify in MMYY format. |br| 
            serverMode (str): Valid values are: PRODUCTION, UAT. |br| 
        Returns:
           TransactionXMLParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """

        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL

        paramStr = {"CardNumber": cardNum, "ExpDate": expDate}
        response = ConnectionHandler.sendHttpPostRequest(
            paramStr, domain, '/transactservices.svc/ValidCard')

        if isinstance(response, Exception):
            return response
        elif response is not None and response != "":
            validationResponse = TransactionXMLParser.getValidateCardResponse(
                response)
            return validationResponse
        else:
            return None
    def processValidCardLength(cardNum, serverMode):
        r"""The ValidCardLength service checks the card length based on the card type.   

        Args:    
            cardNum (str): The credit card number to verify. |br| 
            serverMode (str): Valid values are: PRODUCTION, UAT. |br| 
        Returns:
           TransactionXMLParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """

        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL

        paramStr = {"CardNumber": cardNum}
        response = ConnectionHandler.sendHttpPostRequest(
            paramStr, domain, '/transactservices.svc/ValidCardLength')

        if isinstance(response, Exception):
            return response
        elif response is not None and response != "":
            validationResponse = TransactionXMLParser.getValidateCardLengthResponse(
                response)
            return validationResponse
        else:
            return None
    def processValidExpDate(expDate, serverMode):
        r"""The ValidExpDate service checks the expiration date to ensure it is valid.   

        Args:    
            expDate (str): The expiration date of the credit card to verify in MMYY format. |br| 
            serverMode (str): Valid values are: PRODUCTION, UAT. |br| 
        Returns:
           TransactionXMLParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """

        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL

        paramStr = {"ExpDate": expDate}
        response = ConnectionHandler.sendHttpPostRequest(
            paramStr, domain, '/transactservices.svc/ValidExpDate')

        if isinstance(response, Exception):
            return response
        elif response is not None and response != "":
            validationResponse = TransactionXMLParser.getValidateExpDateResponse(
                response)
            return validationResponse
        else:
            return None
    def processValidCardLength(cardNum, serverMode):   
        r"""The ValidCardLength service checks the card length based on the card type.   

        Args:    
            cardNum (str): The credit card number to verify. |br| 
            serverMode (str): Valid values are: PRODUCTION, UAT. |br| 
        Returns:
           TransactionXMLParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """
        
        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            
        paramStr = {
                    "CardNumber" : cardNum
        }
        response = ConnectionHandler.sendHttpPostRequest(paramStr, domain, '/transactservices.svc/ValidCardLength')
        
        if isinstance(response, Exception):
            return response
        elif response is not None and response != "":
            validationResponse = TransactionXMLParser.getValidateCardLengthResponse(response)
            return validationResponse;
        else:
            return None
    def processValidCard(cardNum, expDate, serverMode):   
        r"""The ValidCard service operation performs a validation check on a credit card. It checks the card length based on the card type, performs a mod 10 checksum, and checks the expiration date.   

        Args:    
            cardNum (str): The credit card number to verify. |br| 
            expDate (str): The expiration date of the credit card to verify in MMYY format. |br| 
            serverMode (str): Valid values are: PRODUCTION, UAT. |br| 
        Returns:
           TransactionXMLParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """
        
        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            
        paramStr = {
                    "CardNumber" : cardNum,
                    "ExpDate" : expDate
        }
        response = ConnectionHandler.sendHttpPostRequest(paramStr, domain, '/transactservices.svc/ValidCard')
        
        if isinstance(response, Exception):
            return response
        elif response is not None and response != "":
            validationResponse = TransactionXMLParser.getValidateCardResponse(response)
            return validationResponse;
        else:
            return None   
    def manageCreditCardInfo(transType, vendor, customerKey, cardInfoKey, ccAccountNum, ccExpDate, ccNameonCard, 
                ccStreet, ccZip, extData, serverMode):
        
        r"""This method will help to build the ManageCreditCardInfo request, to send the same request and after getting it's response will extract it's data and will return the response   

        Args:             
            transType (str): The transaction type being performed. Valid values are: |br| 
            Add |br| 
            Update |br| 
            Delete |br| 
            vendor (str): Your PayLeap Vendor number that uniquely identifies your merchant account. |br| 
            customerKey (str): Unique numerical identifier for a customer. Found in the response values of operations for managing customer information and adding recurring payments. |br| 
            cardInfoKey (str): Unique numerical identifier for credit card. Found in the response values for AddRecurringCreditCard as the CcInfoKey. |br| 
            ccAccountNum (str): Credit card number used for the transaction. |br| 
            ccExpDate (str): Expiration date of the credit card used for the transaction in MMYY format. |br| 
            ccNameonCard  (str): Cardholder's name as printed on the card. |br| 
            ccStreet (str): Cardholder's street address. Used for AVS. |br| 
            ccZip (str): Cardholder's billing ZIP or postal code. Used for AVS. |br| 
            extData (str): Not used for this operation. |br| 
            serverMode (str): Valid values are: PRODUCTION, UAT. |br|
        Returns:
           MerchantServicesXMLResponseParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """
        
        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD
            
        paramStr = {
                    "Username" : userName,
                    "Password" : password,
                    "TransType" : transType,
                    "Vendor" : vendor,
                    "CustomerKey" : customerKey,
                    "CardInfoKey" : cardInfoKey,
                    "CcAccountNum" : ccAccountNum,
                    "CcExpDate" : ccExpDate,
                    "CcNameonCard" : ccNameonCard,
                    "CcStreet" : ccStreet,
                    "CcZip" : ccZip,
                    "ExtData" : extData
        }
        response = ConnectionHandler.sendHttpPostRequest(paramStr, domain, '/MerchantServices.svc/ManageCreditCardInfo')
        
        if isinstance(response, Exception):
            return response
        elif response is not None:
            merchantServiceResponse = MerchantServicesXMLResponseParser(response)
            return merchantServiceResponse;
        else:
            return None
Esempio n. 8
0
    def processCreditCard(transType, cardNum, expDate, nameOnCard, magData, amount, invNum, pnref, 
                 zipCode, street, cvNumber, extData, serverMode):   
        r"""This method will help to build the ProcessCreditCard request, to send the same request and after getting it's response will extract it's data and will return the response   

        Args:    
            transType (str): The transaction type being performed. e.g. Sale, Adjustment etc. |br| 
            cardNum (str): The credit card number used for the transaction. |br| 
            expDate (str): The expiration date of the credit card used for the transaction in MMYY format. |br| 
            nameOnCard (str): The cardholder's name as printed on the card. |br| 
            magData (str): For swiped transactions, the complete raw magnetic stripe data from the card wrapped in single quotes.  |br| 
            amount (str): The dollar amount of the transaction in DDDDDDDDDD.CC format. This amount includes any tax or tip amounts specified in ExtData. |br| 
            invNum (str): The invoice number used by the merchant to identify the transaction. |br| 
            pnref (str): Not used for this transaction type. |br| 
            zipCode (str): The cardholder's billing ZIP code. Used for AVS. |br| 
            street (str): The cardholder's street address. Used for AVS. |br| 
            cvNumber (str): The 3 to 4 digit card verification number. For American Express, four digits displayed on the front of the card; for other card types, usually three digits displayed on the back of the card. |br| 
            extData (str): An XML string containing additional data for the transaction. See the following section for more information. |br|
            serverMode (str): Valid values are: PRODUCTION, UAT. |br| 
        Returns:
           TransactionXMLParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """
        
        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD
            
        paramStr = {
                    "UserName" : userName,
                    "Password" : password,
                    "TransType" : transType,
                    "CardNum" : cardNum,
                    "ExpDate" : expDate,
                    "MagData" : magData,
                    "NameOnCard" : nameOnCard,
                    "Amount" : amount,
                    "InvNum" : invNum,
                    "PNRef" : pnref,
                    "Zip" : zipCode,
                    "Street" : street,
                    "CVNum" : cvNumber,
                    "ExtData" : extData
        }
        response = ConnectionHandler.sendHttpPostRequest(paramStr, domain, '/transactServices.svc/ProcessCreditCard')
        
        if isinstance(response, Exception):
            return response
        elif response is not None and response != "":
            transactionXMLParser = TransactionXMLParser(response);
            return transactionXMLParser;
        else:
            return None            
    def processGiftCard(transType, cardNum, expDate, magData, amount, invNum, pnref, extData, serverMode):   
        r"""This method will help to build the ProcessGiftCard request, to send the same request and after getting it's response will extract it's data and will return the response   

        Args:    
            transType (str): The transaction type being performed.  |br| 
            cardNum (str): The gift card number used for the transaction. |br| 
            expDate (str): The expiration date of the gift card used for the transaction in MMYY format. |br| 
            magData (str): The complete raw magnetic stripe data from the card wrapped in single quotes. |br| 
            amount (str): The dollar amount of the transaction in DDDDDDDDDD.CC format. |br| 
            invNum (str): The invoice number used by the merchant to identify the transaction. |br| 
            pnref (str): The PNRef number of the original transaction being refunded. If applicable. |br| 
            extData (str): An XML string containing additional data for the transaction. See the following section for more information. |br| 
            serverMode (str): Valid values are: PRODUCTION, UAT. |br| 
        Returns:
           TransactionXMLParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """
        
        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD
            
        paramStr = {
                    "UserName" : userName,
                    "Password" : password,
                    "TransType" : transType,
                    "CardNum" : cardNum,
                    "ExpDate" : expDate,
                    "MagData" : magData,
                    "Amount" : amount,
                    "InvNum" : invNum,
                    "PNRef" : pnref,
                    "ExtData" : extData
        }
        response = ConnectionHandler.sendHttpPostRequest(paramStr, domain, '/transactservices.svc/ProcessGiftCard')
        
        if isinstance(response, Exception):
            return response
        elif response is not None and response != "":
            transactionXMLParser = TransactionXMLParser(response);
            return transactionXMLParser;
        else:
            return None            
Esempio n. 10
0
    def processCheck(vendor, checkInfoKey, amount, invNum, extData,
                     serverMode):
        r"""This method will help to build the ProcessCheck request, to send the same request and after getting it's response will extract it's data and will return the response   

        Args:             
            vendor (str): Your PayLeap Vendor number that uniquely identifies your merchant account. |br| 
            checkInfoKey (str): Unique numerical identifier for check. Found in the response values for AddRecurringCheck and ManageCheckInfo. |br| 
            amount (str): The dollar amount of the transaction in DDDDDDDDDD.CC format. |br| 
            invNum (str): The invoice number used by the merchant to identify the transaction. |br| 
            extData (str): Not used for this operation. |br| 
            serverMode (str): Valid values are: PRODUCTION, UAT. |br| 
        Returns:
           MerchantServicesXMLResponseParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """

        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD

        paramStr = {
            "Username": userName,
            "Password": password,
            "Vendor": vendor,
            "CheckInfoKey": checkInfoKey,
            "Amount": amount,
            "InvNum": invNum,
            "ExtData": extData
        }
        response = ConnectionHandler.sendHttpPostRequest(
            paramStr, domain, '/MerchantServices.svc/ProcessCheck')

        if isinstance(response, Exception):
            return response
        elif response is not None:
            merchantServiceResponse = MerchantServicesXMLResponseParser(
                response)
            return merchantServiceResponse
        else:
            return None
    def processCreditCard(vendor, ccInfoKey, amount, invNum, extData, serverMode):
        r"""This method will help to build the ProcessCreditCard request, to send the same request and after getting it's response will extract it's data and will return the response   

        Args:             
            vendor (str): Your PayLeap Vendor number that uniquely identifies your merchant account. |br| 
            ccInfoKey (str): Unique numerical identifier for credit card. Found in the response values for AddRecurringCreditCard and ManageCreditCardInfo. |br| 
            amount (str): The dollar amount of the transaction in DDDDDDDDDD.CC format. |br| 
            invNum (str): The invoice number used by the merchant to identify the transaction. |br| 
            extData (str): Not used for this operation. |br| 
            serverMode (str): Valid values are: PRODUCTION, UAT. |br| 
        Returns:
           MerchantServicesXMLResponseParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """
        
        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD
            
        paramStr = {
                    "Username" : userName,
                    "Password" : password,
                    "Vendor" : vendor,
                    "CcInfoKey" : ccInfoKey,
                    "Amount" : amount,
                    "InvNum" : invNum,
                    "ExtData" : extData
        }
        response = ConnectionHandler.sendHttpPostRequest(paramStr, domain, '/MerchantServices.svc/ProcessCreditCard')
        
        if isinstance(response, Exception):
            return response
        elif response is not None:
            merchantServiceResponse = MerchantServicesXMLResponseParser(response)
            return merchantServiceResponse;
        else:
            return None
    def getOpenBatchSummary(rPNum, beginDt, endDt, extData, serverMode):
        r"""This method will help build to the GetOpenBatchSummary request, to send the same request and after getting it's response will extract it's data and will return the response   

        Args:    
            rPNum (str): Your PayLeap Vendor number that uniquely identifies your merchant account. |br|
            beginDt (str): The begin date of the date range in MM/DD/YYYY format. This date will be converted to: MM/DD/YYYYT00:00:00:0000AM |br|
            endDt (str): The end date of the date range in MM/DD/YYYY format. This date will be converted to: MM/DD/YYYYT12:59:59:9999PM |br|
            extData (str): Not used for this operation. |br|
            serverMode (str): Valid values are: PRODUCTION, UAT. |br|
        Returns:
           GetOpenBatchSummaryRespParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """

        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD

        paramStr = {
            "UserName": userName,
            "Password": password,
            "RPNum": rPNum,
            "BeginDt": beginDt,
            "EndDt": endDt,
            "ExtData": extData
        }
        response = ConnectionHandler.sendHttpPostRequest(
            paramStr, domain, '/reportingservices.svc/GetOpenBatchSummary')

        if isinstance(response, Exception):
            return response
        elif response is not None and response != "":
            openBatchSummaryResponse = GetOpenBatchSummaryRespParser.parser(
                response)
            return openBatchSummaryResponse
        else:
            return None
    def getOpenBatchSummary(rPNum, beginDt, endDt, extData, serverMode):
        r"""This method will help build to the GetOpenBatchSummary request, to send the same request and after getting it's response will extract it's data and will return the response   

        Args:    
            rPNum (str): Your PayLeap Vendor number that uniquely identifies your merchant account. |br|
            beginDt (str): The begin date of the date range in MM/DD/YYYY format. This date will be converted to: MM/DD/YYYYT00:00:00:0000AM |br|
            endDt (str): The end date of the date range in MM/DD/YYYY format. This date will be converted to: MM/DD/YYYYT12:59:59:9999PM |br|
            extData (str): Not used for this operation. |br|
            serverMode (str): Valid values are: PRODUCTION, UAT. |br|
        Returns:
           GetOpenBatchSummaryRespParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """
        
        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD
            
        paramStr = {
                    "UserName" : userName,
                    "Password" : password,
                    "RPNum" : rPNum,
                    "BeginDt" : beginDt,
                    "EndDt" : endDt,
                    "ExtData" : extData
        }
        response = ConnectionHandler.sendHttpPostRequest(paramStr, domain, '/reportingservices.svc/GetOpenBatchSummary')
        
        if isinstance(response, Exception):
            return response
        elif response is not None and response != "":
            openBatchSummaryResponse = GetOpenBatchSummaryRespParser.parser(response);
            return openBatchSummaryResponse;
        else:
            return None
Esempio n. 14
0
    def getInfo(transType, extData, serverMode):
        r"""This method will help to build the GetInfo request, to send the same request and after getting it's response will extract it's data and will return the response   

        Args:    
            transType (str): The transaction type being performed. |br|
            extData (str): An XML string containing additional data for the transaction. See the following section for more information. |br|
            serverMode (str): Valid values are: PRODUCTION, UAT. |br|
        Returns:
           GetInfoRespParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """

        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD

        paramStr = {
            "UserName": userName,
            "Password": password,
            "TransType": transType,
            "ExtData": extData
        }
        response = ConnectionHandler.sendHttpPostRequest(
            paramStr, domain, '/reportingservices.svc/GetInfo')

        if isinstance(response, Exception):
            return response
        elif response is not None and response != "":
            infoResponse = GetInfoRespParser.parser(response)
            return infoResponse
        else:
            return None
Esempio n. 15
0
    def getInfo(transType, extData, serverMode):
        r"""This method will help to build the GetInfo request, to send the same request and after getting it's response will extract it's data and will return the response   

        Args:    
            transType (str): The transaction type being performed. |br|
            extData (str): An XML string containing additional data for the transaction. See the following section for more information. |br|
            serverMode (str): Valid values are: PRODUCTION, UAT. |br|
        Returns:
           GetInfoRespParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """
        
        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD
            
        paramStr = {
                    "UserName" : userName,
                    "Password" : password,
                    "TransType" : transType,
                    "ExtData" : extData
        }
        response = ConnectionHandler.sendHttpPostRequest(paramStr, domain, '/reportingservices.svc/GetInfo')
        
        if isinstance(response, Exception):
            return response
        elif response is not None and response != "":
            infoResponse = GetInfoRespParser.parser(response);
            return infoResponse;
        else:
            return None
    def manageCheckInfo(transType, vendor, customerKey, checkInfoKey, checkType, accountType, checkNum, mICR, accountNum, transitNum, sS, dOB, 
                branchCity, dL, stateCode, nameOnCheck, email, dayPhone, street1, street2, street3, city, stateID, province, postalCode, 
                countryID, extData, serverMode):
        
        r"""This method will help to build the ManageCheckInfo request, to send the same request and after getting it's response will extract it's data and will return the response   

        Args:             
            transType (str): The transaction type being performed. Valid values are: |br| 
            Add |br| 
            Update |br| 
            Delete |br| 
            vendor (str): Your PayLeap Vendor number that uniquely identifies your merchant account. |br| 
            customerKey (str): Unique numerical identifier for the customer. Found in the response values of operations for managing customer information and adding recurring payments. |br| 
            checkInfoKey (str): Unique numerical identifier for check. Found in the response values for AddRecurringCheck. |br| 
            checkType (str): Indicates check type. Valid values are: |br| 
            Personal |br| 
            Business |br| 
            accountType (str): Indicates to which type of account the check points. Valid values are: |br| 
            Checking |br| 
            Savings |br| 
            checkNum (str): The check number printed on the check. |br| 
            mICR (str): The scanned MICR data of the check. |br| 
            accountNum (str): The account number printed on the check. |br| 
            transitNum (str): The routing number printed on the check. |br| 
            sS (str): The customer's Social Security Number in ###-###-#### format. |br| 
            dOB  (str): The customer's date of birth in MM/DD/YYYY format. |br| 
            branchCity (str): The city in which the branch of the bank is located. |br| 
            dL (str): The customer's date of birth in MM/DD/YYYY format. |br| 
            stateCode (str): The customer's two-digit driver's license state or province code. |br| 
            nameOnCheck (str): The customer's name as printed on the check. |br| 
            email (str): Customer's billing email address. |br| 
            dayPhone (str): Customer's phone number in ###-###-#### format. |br| 
            street1 (str): Line 1 of customer's street address. |br| 
            street2 (str): Line 2 of customer's street address. |br| 
            street3 (str): Line 3 of customer's street address. |br| 
            city (str): Customer's city. |br| 
            stateID (str): Customer's 2-digit state code. |br| 
            province (str): Customer's province if outside the USA. |br| 
            postalCode  (str): Customer's ZIP or postal code. |br| 
            countryID (str): Customer's 3-digit country code. For example: USA, CAN. |br| 
            extData (str): Not used for this operation. |br| 
            serverMode (str): Valid values are: PRODUCTION, UAT. |br| 
        Returns:
           MerchantServicesXMLResponseParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """
        
        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD
            
        paramStr = {
                    "Username" : userName,
                    "Password" : password,
                    "TransType" : transType,
                    "Vendor" : vendor,
                    "CustomerKey" : customerKey,
                    "CheckInfoKey" : checkInfoKey,
                    "CheckType" : checkType,
                    "AccountType" : accountType,
                    "CheckNum" : checkNum,
                    "MICR" : mICR,
                    "AccountNum" : accountNum, 
                    "TransitNum" : transitNum,
                    "SS" : sS,
                    "DOB" : dOB,
                    "BranchCity" : branchCity, 
                    "DL" : dL,
                    "StateCode" : stateCode, 
                    "NameOnCheck" : nameOnCheck,
                    "Email" : email,
                    "DayPhone" : dayPhone,
                    "Street1" : street1,
                    "Street2" : street2,
                    "Street3" : street3,
                    "City" : city,
                    "StateID" : stateID,
                    "Province" : province,
                    "PostalCode" : postalCode,
                    "CountryID" : countryID,
                    "ExtData" : extData
        }
        response = ConnectionHandler.sendHttpPostRequest(paramStr, domain, '/MerchantServices.svc/ManageCheckInfo')
        
        if isinstance(response, Exception):
            return response
        elif response is not None:
            merchantServiceResponse = MerchantServicesXMLResponseParser(response)
            return merchantServiceResponse;
        else:
            return None
Esempio n. 17
0
    def processCheck(transType, checkNum, transitNum, accountNum, invNum,
                     amount, micr, nameOnCheck, dl, ss, dob, stateCode,
                     checkType, pnref, magdata, extData, serverMode):
        r"""This method will help to build the ProcessCheck request, to send the same request and after getting it's response will extract it's data and will return the response   

        Args:    
            transType (str): The transaction type being performed. |br| 
            checkNum (str): The check number printed on the check. |br| 
            transitNum (str): The routing number printed on the check. |br| 
            accountNum (str): The account number printed on the check. |br| 
            invNum (str): Not used for this service. |br| 
            amount (str): The dollar amount of the transaction in DDDDDDDDDD.CC format. |br| 
            micr (str): The raw MICR data from the check in the following format. |br| 
            [TransitNum]T[AccountNum]O[CheckNum] |br| 
            Required only for the following SecCode values specified in ExtData: POP, BOC, ARC, C21 |br| 
            nameOnCheck (str): The customer's name as printed on the check. |br| 
            dl (str): The customer's driver's license number. Usage varies by check processor. |br| 
            ss (str): The customer's social security number. Usage varies by check processor. |br| 
            dob (str): The customer's date of birth in MM/DD/YYYY format. Usage varies by check processor. |br| 
            stateCode (str): The customer's two-digit driver's license state or province code. Usage varies by check processor. |br| 
            checkType (str): The type of bank account on which the check draws. Valid values are: |br| 
            Personal |br| 
            Corporate |br| 
            Government |br| 
            pnref (str): The PNRef number of the original sale transaction being refunded |br| 
            magdata (str):  |br| 
            extData (str): An XML string containing additional data for the transaction. See the following section for more information. |br|
            serverMode (str): Valid values are: PRODUCTION, UAT. |br|  
        Returns:
           TransactionXMLParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """

        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD

        paramStr = {
            "UserName": userName,
            "Password": password,
            "TransType": transType,
            "CheckNum": checkNum,
            "TransitNum": transitNum,
            "AccountNum": accountNum,
            "InvNum": invNum,
            "Amount": amount,
            "InvNum": invNum,
            "MICR": micr,
            "NameOnCheck": nameOnCheck,
            "DL": dl,
            "SS": ss,
            "DOB": dob,
            "StateCode": stateCode,
            "CheckType": checkType,
            "PNRef": pnref,
            "MagData": magdata,
            "ExtData": extData
        }
        response = ConnectionHandler.sendHttpPostRequest(
            paramStr, domain, '/transactservices.svc/ProcessCheck')

        if isinstance(response, Exception):
            return response
        elif response is not None and response != "":
            transactionXMLParser = TransactionXMLParser(response)
            return transactionXMLParser
        else:
            return None
    def processDebitCard(transType, cardNum, expDate, magData, nameOnCard, amount, invNum, pNRef, 
                 pin, sureChargeAmt, cashBackAmt, registerNum, extData, serverMode):   
        r"""This method will help to build the ProcessDebitCard request, to send the same request and after getting it's response will extract it's data and will return the response   

        Args:    
            transType (str): The transaction type being performed. |br| 
            cardNum (str): The debit card number used for the transaction. |br| 
            expDate (str): The expiration date of the debit card used for the transaction in MMYY format. |br| 
            magData (str): The complete raw magnetic stripe data from the card wrapped in single quotes. |br| 
            nameOnCard (str): The cardholder's name as printed on the card. |br| 
            amount (str): The dollar amount of the transaction in DDDDDDDDDD.CC format. This amount includes any cash back or surcharge amounts and any tax or tip amounts specified in ExtData. |br| 
            invNum (str): The invoice number used by the merchant to identify the transaction. |br| 
            pNRef (str): The PNRef number of the original sale transaction being refunded. |br| 
            pin (str): The encrypted PIN block returned by the PIN pad. The transaction will fail if an unencrypted PIN value is used. |br| 
            sureChargeAmt (str): The amount in DDDD.CC format that a merchant charges for processing a debit card transaction. |br| 
            cashBackAmt (str): The amount in DDDD.CC format that a cardholder requests for cash back |br| 
            registerNum (str): Not used |br| 
            extData (str): An XML string containing additional data for the transaction. See the following section for more information. |br| 
            serverMode (str): Valid values are: PRODUCTION, UAT. |br| 
        Returns:
           TransactionXMLParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """
        
        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD
            
        paramStr = {
                    "UserName" : userName,
                    "Password" : password,
                    "TransType" : transType,
                    "CardNum" : cardNum,
                    "ExpDate" : expDate,
                    "MagData" : magData,
                    "NameOnCard" : nameOnCard,
                    "Amount" : amount,
                    "InvNum" : invNum,
                    "PNRef" : pNRef,
                    "Pin" : pin,
                    "SureChargeAmt" : sureChargeAmt,
                    "CashBackAmt" : cashBackAmt,
                    "RegisterNum" : registerNum,
                    "ExtData" : extData       
        }
        response = ConnectionHandler.sendHttpPostRequest(paramStr, domain, '/transactservices.svc/ProcessDebitCard')
        
        if isinstance(response, Exception):
            return response
        elif response is not None and response != "":
            transactionXMLParser = TransactionXMLParser(response);
            return transactionXMLParser;
        else:
            return None
Esempio n. 19
0
    def addRecurringCheck(
            vendor, customerID, customerName, firstName, lastName, title,
            department, street1, street2, street3, city, stateID, province,
            zipCdoe, countryID, email, mobile, contractID, contractName,
            billAmt, taxAmt, totalAmt, startDate, endDate, billingPeriod,
            billingInterval, maxFailures, failureInterval, emailCustomer,
            emailMerchant, emailCustomerFailure, emailMerchantFailure,
            checkType, accountType, checkNum, mICR, accountNum, transitNum, sS,
            dOB, branchCity, dL, stateCode, nameOnCheck, extData, serverMode):
        r"""This method will help to build the AddRecurringCheck request, to send the same request and after getting it\'s response will extract it\'s data and will return the response   

        Args:
            vendor (str): Your PayLeap Vendor number that uniquely identifies your merchant account. |br| 
            customerID (str): Unique, merchant-supplied identifier for a customer. |br| 
            customerName (str): Name used to refer to customer in SCM API. |br| 
            firstName (str): Customer\'s first name. |br| 
            lastName (str): Customer\'s last name. |br| 
            title (str): Customer\'s title. |br| 
            department (str): Customer\'s department. |br| 
            street1 (str): Line 1 of customer\'s street address. |br| 
            street2 (str): Line 2 of customer\'s street address. |br| 
            street3 (str): Line 3 of customer\'s street address. |br| 
            city (str): Customer\'s city. |br| 
            stateID (str): Customer\'s 2-digit state code. |br| 
            province (str): Customer\'s province if outside the USA. |br| 
            zipCdoe (str): Customer\'s ZIP or postal code. |br| 
            countryID (str): Customer\'s 3-digit country code. For example: USA, CAN. |br| 
            email (str): Customer\'s billing email address. |br| 
            mobile (str): Customer\'s phone number in ###-###-#### format. |br| 
            contractID (str): Unique, merchant-supplied identifier for the contract. |br| 
            contractName (str): Merchant-supplied contract name. |br| 
            billAmt (str): The amount to be billed in relation to the contract in DDDDDDDDDD.CC format. |br| 
            taxAmt (str): The tax amount in DDDD.CC format. |br| 
            totalAmt (str): The total amount of the transaction in DDDDDDDDDD.CC format. This includes any tax specified in TaxAmt. |br| 
            startDate (str): Start date of the contract in MM/DD/YYYY format. |br| 
            endDate (str): End date of the contract in MM/DD/YYYY format. If this date is not given, the contract will continue to run until manually cancelled or suspended by the system due to failure of payment. |br| 
            billingPeriod (str): Used in conjunction with BillingInterval to compute next bill date. Valid values are: |br|
            Day or Daily, |br|
            Week or Weekly, |br| 
            Biweekly, Month or Monthly, |br| 
            Semimonth or Semimonthly, |br| 
            Year or Annually, Semiannually, 
            Quarterly. |br|
            billingInterval (str): Indicates the day on which the billing interval will be applied. For a BillingPeriod of Week/Weekly or Biweekly, valid values are: |br| 
            Mon or 1,  |br| Tue or 2,  |br| Wed or 3,  |br| Thu or 4,  |br| Fri or 5,  |br| Sat or 6,  |br| Sun or 7. |br| 
            For a BillingPeriod of Month/Monthly, valid values are: |br|
            1 to 31 (the date of the month) |br|
            Last (the last day of each month) |br|
            For a BillingPeriod of Day/Daily, Year/Annually, Semiannually, Semimonth/Semimonthly, or Quarterly, set this parameter to 0. The system will calculate the BillingInterval using the StartDate in the contract. |br|  |br| 
            maxFailures (str): The maximum number of attempts to submit a payment before system puts contract into a suspended mode. |br| 
            failureInterval (str): The number of days system will wait between each reattempt at processing payment. |br| 
            emailCustomer (str): Indicates whether to email the customer regarding the status of recurring payment. Valid values are: True or False. |br| 
            emailMerchant (str): Indicates whether to email the merchant regarding the status of recurring payment. Valid values are: True or False. |br| 
            emailCustomerFailure (str): Indicates whether to email the customer if recurring payment fails. Valid values are: True or False.
            emailMerchantFailure (str): Indicates whether to email the merchant if recurring payment fails. Valid values are: True or False. 
            checkType (str): Indicates check type. Valid values are:Personal, Business. |br| 
            accountType (str): Indicates to which type of account the check points. Valid values are:Checking, Savings. |br| 
            checkNum (str): The check number printed on the check. |br| 
            mICR (str): The scanned MICR data of the check. |br| 
            accountNum (str): The account number printed on the check. |br| 
            transitNum (str): The routing number printed on the check. |br| 
            sS (str): The customer\'s Social Security Number in ###-###-#### format. |br| 
            dOB (str): The customer\'s date of birth in MM/DD/YYYY format. |br| 
            branchCity (str): The city in which the branch of the bank is located. |br| 
            dL (str): The customer\'s date of birth in MM/DD/YYYY format. |br| 
            stateCode (str): The customer\'s two-digit driver\'s license state or province code. |br| 
            nameOnCheck (str): The customer\'s name as printed on the check. |br| 
            extData (str): Not used for this operation. |br| 
            serverMode (str): Valid values are: PRODUCTION, UAT. |br|        
    
        Returns:
           MerchantServicesXMLResponseParser. Will populated using XML response. 
    
        Raises:
           Exception, For all type of exceptions    
        """

        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD

        paramStr = {
            "Username": userName,
            "Password": password,
            "Vendor": vendor,
            "CustomerID": customerID,
            "CustomerName": customerName,
            "FirstName": firstName,
            "LastName": lastName,
            "Title": title,
            "Department": department,
            "Street1": street1,
            "Street2": street2,
            "Street3": street3,
            "City": city,
            "StateID": stateID,
            "Province": province,
            "Zip": zipCdoe,
            "CountryID": countryID,
            "Email": email,
            "Mobile": mobile,
            "ContractID": contractID,
            "ContractName": contractName,
            "BillAmt": billAmt,
            "TaxAmt": taxAmt,
            "TotalAmt": totalAmt,
            "StartDate": startDate,
            "EndDate": endDate,
            "BillingPeriod": billingPeriod,
            "BillingInterval": billingInterval,
            "MaxFailures": maxFailures,
            "FailureInterval": failureInterval,
            "EmailCustomer": emailCustomer,
            "EmailMerchant": emailMerchant,
            "EmailCustomerFailure": emailCustomerFailure,
            "EmailMerchantFailure": emailMerchantFailure,
            "CheckType": checkType,
            "AccountType": accountType,
            "CheckNum": checkNum,
            "MICR": mICR,
            "AccountNum": accountNum,
            "TransitNum": transitNum,
            "SS": sS,
            "DOB": dOB,
            "BranchCity": branchCity,
            "DL": dL,
            "StateCode": stateCode,
            "NameOnCheck": nameOnCheck,
            "ExtData": extData
        }
        response = ConnectionHandler.sendHttpPostRequest(
            paramStr, domain, '/MerchantServices.svc/AddRecurringCheck')

        if isinstance(response, Exception):
            return response
        elif response is not None:
            merchantServiceResponse = MerchantServicesXMLResponseParser(
                response)
            return merchantServiceResponse
        else:
            return None
Esempio n. 20
0
    def manageCustomer(transType, vendor, customerKey, customerID,
                       customerName, firstName, lastName, title, department,
                       street1, street2, street3, city, stateID, province,
                       zipCode, countryID, dayPhone, nightPhone, fax, email,
                       mobile, status, extData, serverMode):
        r"""This method will help to build the ManageCustomer request, to send the same request and after getting it's response will extract it's data and will return the response   

        Args:    
            transType (str): The transaction type being performed. Valid values are: |br| 
            Add |br| 
            Update |br| 
            Delete |br| 
            vendor (str): Your PayLeap Vendor number that uniquely identifies your merchant account. |br| 
            customerKey (str): Unique numerical identifier for a customer. Found in the response values for ManageCustomer, AddRecurringCreditCard, and AddRecurringCheck. |br| 
            customerID (str): Unique, merchant-supplied identifier for a customer. |br| 
            customerName (str): Customer's name. |br| 
            firstName (str): Customer's first name. |br| 
            lastName (str): Customer's last name. |br| 
            title (str): Customer's title. |br| 
            department (str): Customer's department. |br| 
            street1 (str): Line 1 of customer's street address. |br| 
            street2 (str): Line 2 of customer's street address.  |br| 
            street3 (str): Line 3 of customer's street address. |br| 
            city (str): Customer's city. |br| 
            stateID (str): Customer's 2-digit state code. |br| 
            province (str): Customer's province if outside the USA. |br| 
            zipCode (str): Customer's ZIP or postal code. |br| 
            countryID (str): Customer's 3-digit country code. For example: USA, CAN. |br| 
            dayPhone (str): Customer's daytime number in ###-###-#### format. |br| 
            nightPhone (str): Customer's nighttime number in ###-###-#### format. |br| 
            fax (str): Customer's fax number in ###-###-#### format. |br| 
            email (str): Customer's billing email address. |br| 
            mobile (str): Customer's mobile number in ###-###-#### format. |br| 
            status (str): Status |br| 
            extData (str): Not used for this operation. |br|      
            serverMode (str): Valid values are: PRODUCTION, UAT. |br|
        Returns:
           MerchantServicesXMLResponseParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """

        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD

        paramStr = {
            "Username": userName,
            "Password": password,
            "TransType": transType,
            "Vendor": vendor,
            "CustomerKey": customerKey,
            "CustomerID": customerID,
            "CustomerName": customerName,
            "FirstName": firstName,
            "LastName": lastName,
            "Title": title,
            "Department": department,
            "Street1": street1,
            "Street2": street2,
            "Street3": street3,
            "City": city,
            "StateID": stateID,
            "Province": province,
            "Zip": zipCode,
            "CountryID": countryID,
            "DayPhone": dayPhone,
            "NightPhone": nightPhone,
            "Fax": fax,
            "Email": email,
            "Mobile": mobile,
            "Status": status,
            "ExtData": extData
        }
        response = ConnectionHandler.sendHttpPostRequest(
            paramStr, domain, '/MerchantServices.svc/ManageCustomer')

        if isinstance(response, Exception):
            return response
        elif response is not None:
            merchantServiceResponse = MerchantServicesXMLResponseParser(
                response)
            return merchantServiceResponse
        else:
            return None
    def addRecurringCreditCard(
        vendor,
        customerID,
        customerName,
        firstName,
        lastName,
        title,
        department,
        street1,
        street2,
        street3,
        city,
        stateID,
        province,
        zipCode,
        countryID,
        email,
        mobile,
        contractID,
        contractName,
        billAmt,
        taxAmt,
        totalAmt,
        startDate,
        endDate,
        billingPeriod,
        billingInterval,
        maxFailures,
        failureInterval,
        emailCustomer,
        emailMerchant,
        emailCustomerFailure,
        emailMerchantFailure,
        ccAccountNum,
        ccExpdate,
        ccNameOnCard,
        ccStreet,
        ccZip,
        extData,
        serverMode,
    ):

        r"""This method will help to build the AddRecurringCreditCard request, to send the same request and after getting it\'s response will extract it\'s data and will return the response   

        Args: 
            vendor (str): Your PayLeap Vendor number that uniquely identifies your merchant account. |br| 
            customerID (str): Unique, merchant-supplied identifier for a customer. |br| 
            customerName (str): Name used to refer to customer in SCM API. |br| 
            firstName (str): Customer's first name. |br| 
            lastName (str): Customer's last name. |br| 
            title (str): Customer's title. |br| 
            department (str): Customer's department. |br| 
            street1 (str): Line 1 of customer's street address. |br| 
            street2 (str): Line 2 of customer's street address. |br| 
            street3 (str): Line 3 of customer's street address. |br| 
            city (str): Customer's city. |br| 
            stateID (str): Customer's 2-digit state code. |br| 
            province (str): Customer's province if outside the USA. |br| 
            zipCode (str): Customer's ZIP or postal code. |br| 
            countryID (str): Customer's 3-digit country code. For example: USA, CAN. |br| 
            email (str): Customer's billing email address. |br| 
            mobile (str): Customer's phone number in ###-###-#### format. |br| 
            contractID (str): Unique, merchant-supplied identifier for the contract. |br| 
            contractName (str): Merchant-supplied contract name. |br| 
            billAmt (str): The amount to be billed in relation to the contract in DDDDDDDDDD.CC format. |br| 
            taxAmt (str): The tax amount in DDDD.CC format. |br| 
            totalAmt (str): The total amount of the transaction in DDDDDDDDDD.CC format. This includes any tax specified in TaxAmt. |br| 
            startDate (str): Start date of the contract in MM/DD/YYYY format. |br| 
            endDate (str): End date of the contract in MM/DD/YYYY format. If this date is not given, the contract will continue to run until manually cancelled or suspended by the system due to failure of payment. |br| 
            billingPeriod (str): Used in conjunction with BillingInterval to compute next bill date. Valid values are: |br| 
            Day or Daily |br| 
            Week or Weekly |br| 
            Biweekly |br| 
            Month or Monthly |br| 
            Semimonth or Semimonthly |br| 
            Year or Annually |br| 
            Semiannually |br| 
            Quarterly |br| 
            billingInterval (str): Indicates the day on which the billing interval will be applied. |br| 
            For a BillingPeriod of Week/Weekly or Biweekly, valid values are: |br| 
            Mon or 1 |br| 
            Tue or 2 |br| 
            Wed or 3 |br| 
            Thu or 4 |br| 
            Fri or 5 |br| 
            Sat or 6 |br| 
            Sun or 7 |br| 
            For a BillingPeriod of Month/Monthly, valid values are: |br| 
            1 to 31 (the date of the month) |br| 
            Last (the last day of each month) |br| 
            For a BillingPeriod of Day/Daily, Year/Annually, Semiannually, Semimonth/Semimonthly, or Quarterly, set this parameter to 0. The system will calculate the BillingInterval using the StartDate in the contract. |br| 
            maxFailures (str): The maximum number of attempts to submit a payment before system puts contract into a suspended mode. |br| 
            failureInterval (str): The number of days system will wait between each reattempt at processing payment. |br| 
            emailCustomer (str): Indicates whether to email the customer regarding the status of recurring payment. Valid values are: True or False. |br| 
            emailMerchant (str): Indicates whether to email the merchant regarding the status of recurring payment. Valid values are: True or False. |br| 
            emailCustomerFailure (str): Indicates whether to email the customer if recurring payment fails. Valid values are: True or False. |br| 
            emailMerchantFailure (str): Indicates whether to email the merchant if recurring payment fails. Valid values are: True or False. |br| 
            ccAccountNum (str): Credit card number used for the transaction. |br| 
            ccExpdate (str): Expiration date of the credit card used for the transaction in MMYY format. |br| 
            ccNameOnCard (str): Cardholder's name as printed on the card. |br| 
            ccStreet (str): Cardholder's street Address. Used for AVS. |br| 
            ccZip (str): Cardholder's billing ZIP or postal code. Used for AVS. |br| 
            extData (str): Not used for this operation. |br| 
            serverMode (str): Valid values are: PRODUCTION, UAT. |br| 
    
        Returns:
           MerchantServicesXMLResponseParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """

        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD

        paramStr = {
            "Username": userName,
            "Password": password,
            "Vendor": vendor,
            "CustomerID": customerID,
            "CustomerName": customerName,
            "FirstName": firstName,
            "LastName": lastName,
            "Title": title,
            "Department": department,
            "Street1": street1,
            "Street2": street2,
            "Street3": street3,
            "City": city,
            "StateID": stateID,
            "Province": province,
            "Zip": zipCode,
            "CountryID": countryID,
            "Email": email,
            "Mobile": mobile,
            "ContractID": contractID,
            "ContractName": contractName,
            "BillAmt": billAmt,
            "TaxAmt": taxAmt,
            "TotalAmt": totalAmt,
            "StartDate": startDate,
            "EndDate": endDate,
            "BillingPeriod": billingPeriod,
            "BillingInterval": billingInterval,
            "MaxFailures": maxFailures,
            "FailureInterval": failureInterval,
            "EmailCustomer": emailCustomer,
            "EmailMerchant": emailMerchant,
            "EmailCustomerFailure": emailCustomerFailure,
            "EmailMerchantFailure": emailMerchantFailure,
            "CcAccountNum": ccAccountNum,
            "CcExpdate": ccExpdate,
            "CcNameOnCard": ccNameOnCard,
            "CcStreet": ccStreet,
            "CcZip": ccZip,
            "ExtData": extData,
        }
        response = ConnectionHandler.sendHttpPostRequest(
            paramStr, domain, "/MerchantServices.svc/AddRecurringCreditCard"
        )

        if isinstance(response, Exception):
            return response
        elif response is not None:
            merchantServiceResponse = MerchantServicesXMLResponseParser(response)
            return merchantServiceResponse
        else:
            return None
    def processCheck(transType, checkNum, transitNum, accountNum, invNum, amount, micr, nameOnCheck, 
                 dl, ss, dob, stateCode, checkType, pnref, magdata, extData, serverMode):   
        r"""This method will help to build the ProcessCheck request, to send the same request and after getting it's response will extract it's data and will return the response   

        Args:    
            transType (str): The transaction type being performed. |br| 
            checkNum (str): The check number printed on the check. |br| 
            transitNum (str): The routing number printed on the check. |br| 
            accountNum (str): The account number printed on the check. |br| 
            invNum (str): Not used for this service. |br| 
            amount (str): The dollar amount of the transaction in DDDDDDDDDD.CC format. |br| 
            micr (str): The raw MICR data from the check in the following format. |br| 
            [TransitNum]T[AccountNum]O[CheckNum] |br| 
            Required only for the following SecCode values specified in ExtData: POP, BOC, ARC, C21 |br| 
            nameOnCheck (str): The customer's name as printed on the check. |br| 
            dl (str): The customer's driver's license number. Usage varies by check processor. |br| 
            ss (str): The customer's social security number. Usage varies by check processor. |br| 
            dob (str): The customer's date of birth in MM/DD/YYYY format. Usage varies by check processor. |br| 
            stateCode (str): The customer's two-digit driver's license state or province code. Usage varies by check processor. |br| 
            checkType (str): The type of bank account on which the check draws. Valid values are: |br| 
            Personal |br| 
            Corporate |br| 
            Government |br| 
            pnref (str): The PNRef number of the original sale transaction being refunded |br| 
            magdata (str):  |br| 
            extData (str): An XML string containing additional data for the transaction. See the following section for more information. |br|
            serverMode (str): Valid values are: PRODUCTION, UAT. |br|  
        Returns:
           TransactionXMLParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """
        
        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD
            
        paramStr = {
                    "UserName" : userName,
                    "Password" : password,
                    "TransType" : transType,
                    "CheckNum" : checkNum,
                    "TransitNum" : transitNum,
                    "AccountNum" : accountNum,
                    "InvNum" : invNum,
                    "Amount" : amount,
                    "InvNum" : invNum,
                    "MICR" : micr,
                    "NameOnCheck" : nameOnCheck,
                    "DL" : dl,
                    "SS" : ss,
                    "DOB" : dob,
                    "StateCode" : stateCode,
                    "CheckType" : checkType,
                    "PNRef" : pnref,
                    "MagData" : magdata,
                    "ExtData" : extData
        }
        response = ConnectionHandler.sendHttpPostRequest(paramStr, domain, '/transactservices.svc/ProcessCheck')
        
        if isinstance(response, Exception):
            return response
        elif response is not None and response != "":
            transactionXMLParser = TransactionXMLParser(response);
            return transactionXMLParser;
        else:
            return None
Esempio n. 23
0
    def manageContract(transType, vendor, customerKey, contractKey,
                       paymentInfoKey, paymentType, customerID, customerName,
                       firstName, lastName, title, department, street1,
                       street2, street3, city, stateID, province, zipCode,
                       countryID, email, dayPhone, nightPhone, fax, mobile,
                       contractID, contractName, billAmt, taxAmt, totalAmt,
                       startDate, endDate, nextBillDt, billingPeriod,
                       billingInterval, maxFailures, failureInterval,
                       emailCustomer, emailMerchant, emailCustomerFailure,
                       emailMerchantFailure, status, extData, serverMode):
        r"""This method will help to build the ManageContract request, to send the same request and after getting it's response will extract it's data and will return the response   

        Args:             
            transType (str): The transaction type being performed. Valid values are: |br| 
            Add |br| 
            Update |br| 
            Delete |br| 
            vendor (str): Your PayLeap Vendor number that uniquely identifies your merchant account. |br| 
            customerKey (str): Unique numerical identifier for a customer. Found in the response values for ManageCustomer, AddRecurringCreditCard, and AddRecurringCheck. |br| 
            contractKey (str): Unique numerical identifier for the contract. Found in the response values for AddRecurringCheck and AddRecurringCreditCard. |br| 
            paymentInfoKey (str): Dependent on payment type. For credit cards, use a CcInfoKey or CardInfoKey. For checks, use a CheckInfoKey. |br| 
            These keys can be found in the response values of AddRecurringCreditCard, ManageCreditCardInfo, AddRecurringCheck, and ManageCheckInfo. |br| 
            paymentType (str): Indicates method of payment. Valid values are: |br| 
            CC (for credit card) |br| 
            CK (for check) |br| 
            customerID (str): Unique, merchant supplied identifier for a customer. |br| 
            customerName (str): Customer's name. |br| 
            firstName (str): Customer's first name. |br| 
            lastName (str): Customer's last name. |br| 
            title (str): Customer's title. |br| 
            department (str): Customer's department. |br| 
            street1 (str): Line 1 of customer's street address. |br| 
            street2 (str): Line 2 of customer's street address. |br| 
            street3 (str): Line 3 of customer's street address. |br| 
            city (str): Customer's city. |br| 
            stateID (str): Customer's 2 digit state code. |br| 
            province (str): Customer's province if outside the USA. |br| 
            zipCode (str): Customer's ZIP or postal code. |br| 
            countryID (str): Customer's 3 digit country code. For example: USA, CAN. |br| 
            email (str): Customer's billing email address. |br| 
            dayPhone (str): Customer's daytime number in ###-###-#### format. |br| 
            nightPhone (str): Customer's nighttime number in ###-###-#### format. |br| 
            fax (str): Customer's fax number in ###-###-#### format. |br| 
            mobile (str): Customer's mobile number in ###-###-#### format. |br| 
            contractID (str): Unique, merchant supplied identifier for the contract. |br| 
            contractName (str): Unique, merchant supplied contract name. |br| 
            billAmt (str): The amount to be billed in relation to the contract in DDDDDDDDDD.CC format. |br| 
            taxAmt (str): The tax amount in DDDD.CC format. |br| 
            totalAmt (str): The total amount of the transaction in DDDDDDDDDD.CC format. This includes any tax specified in TaxAmt. |br| 
            startDate (str): Start date of the contract in MM/DD/YYYY format. |br| 
            endDate (str): End date of the contract in MM/DD/YYYY format. If this date is not given, the contract will continue to run until manually cancelled or suspended by the system due to failure of payment. |br| 
            nextBillDt (str): Next billing date in MM/DD/YYYY format. For example: if the next billing date is scheduled to be 01/30/2015, but NextBillDt=02/15/2015 when the request is submitted, the next billing date will change to 02/15/2015. |br| 
            billingPeriod (str): Used in conjunction with BillingInterval to compute next bill date. Valid values are: |br| 
            Day or Daily |br| 
            Week or Weekly |br| 
            Biweekly |br| 
            Month or Monthly |br| 
            Semimonth or Semimonthly |br| 
            Year or Annually |br| 
            Semiannually |br| 
            Quarterly |br| 
            billingInterval (str): Indicates the day on which the billing interval will be applied. |br| 
            For a BillingPeriod of Week/Weekly or Biweekly, valid values are: |br| 
            Mon or 1 |br| 
            Tue or 2 |br| 
            Wed or 3 |br| 
            Thu or 4 |br| 
            Fri or 5 |br| 
            Sat or 6 |br| 
            Sun or 7 |br| 
            For a BillingPeriod of Month/Monthly, valid values are: |br| 
            1 to 31 (the date of the month) |br| 
            Last (the last day of each month) |br| 
            For a BillingPeriod of Day/Daily, Year/Annually, Semiannually, Semimonth/Semimonthly, or Quarterly, set this parameter to 0. The system will calculate the BillingInterval using the StartDate in the contract. |br| 
            maxFailures (str): The maximum number of attempts to submit a payment before system puts contract into a suspended mode. |br| 
            failureInterval (str): The number of days system will wait between each reattempt at processing payment. |br| 
            emailCustomer (str): Indicates whether to email the customer regarding the status of recurring payment. Valid values are: True or False. |br| 
            emailMerchant (str): Indicates whether to email the merchant regarding the status of recurring payment. Valid values are: True or False. |br| 
            emailCustomerFailure (str): Indicates whether to email the customer if recurring payment fails. Valid values are: True or False. |br| 
            emailMerchantFailure (str): Indicates whether to email the merchant if recurring payment fails. Valid values are: True or False. |br| 
            status (str): The status of the contract. Valid values include: |br| 
            Active |br| 
            Inactive |br| 
            extData (str): Not used for this operation. |br| 
            serverMode (str): Valid values are: PRODUCTION, UAT. |br|
        Returns:
           MerchantServicesXMLResponseParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """

        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD

        paramStr = {
            "Username": userName,
            "Password": password,
            "TransType": transType,
            "Vendor": vendor,
            "CustomerKey": customerKey,
            "ContractKey": contractKey,
            "PaymentInfoKey": paymentInfoKey,
            "PaymentType": paymentType,
            "CustomerID": customerID,
            "CustomerName": customerName,
            "FirstName": firstName,
            "LastName": lastName,
            "Title": title,
            "Department": department,
            "Street1": street1,
            "Street2": street2,
            "Street3": street3,
            "City": city,
            "StateID": stateID,
            "Province": province,
            "Zip": zipCode,
            "CountryID": countryID,
            "Email": email,
            "DayPhone": dayPhone,
            "NightPhone": nightPhone,
            "Fax": fax,
            "Mobile": mobile,
            "ContractID": contractID,
            "ContractName": contractName,
            "BillAmt": billAmt,
            "TaxAmt": taxAmt,
            "TotalAmt": totalAmt,
            "StartDate": startDate,
            "EndDate": endDate,
            "NextBillDt": nextBillDt,
            "BillingPeriod": billingPeriod,
            "BillingInterval": billingInterval,
            "MaxFailures": maxFailures,
            "FailureInterval": failureInterval,
            "EmailCustomer": emailCustomer,
            "EmailMerchant": emailMerchant,
            "EmailCustomerFailure": emailCustomerFailure,
            "EmailMerchantFailure": emailMerchantFailure,
            "Status": status,
            "ExtData": extData
        }
        response = ConnectionHandler.sendHttpPostRequest(
            paramStr, domain, '/MerchantServices.svc/ManageContract')

        if isinstance(response, Exception):
            return response
        elif response is not None:
            merchantServiceResponse = MerchantServicesXMLResponseParser(
                response)
            return merchantServiceResponse
        else:
            return None
Esempio n. 24
0
    def getCardTrx(rPNum, pNRef, beginDt, endDt, paymentType,
                   excludePaymentType, transType, excludeTransType,
                   approvalCode, result, excludeResult, nameOnCard, cardNum,
                   cardType, excludeCardType, excludeVoid, user, invoiceId,
                   settleFlag, settleMsg, settleDt, transformType, xsl,
                   colDelim, rowDelim, includeHeader, extData, serverMode):
        r"""This method will help to build the GetCardTrx request, to send the same request and after getting it's response will extract it's data and will return the response   

        Args:             
            rPNum (str): Your PayLeap Vendor number that uniquely identifies your merchant account. |br| 
            pNRef (str): To search for a single transaction, provide the unique payment reference number assigned to the transaction. If this field is provided, all other query fields are ignored. |br| 
            beginDt (str): The begin date of the date range in MM/DD/YYYY (or YYYY-MM-DD or YYYY-MM-DDThh:mm:ss) format. This date will be converted to YYYY-MM-DDThh:mm:ss (time is in 24-hour format). If the submitted value does not contain time information, BeginDt will default to midnight on the given date. For example: |br| 
            2005-08-19T12:00:12 is kept as is |br| 
            2005-08-19 becomes 2005-08-19T00:00:00 |br| 
            2005/08/19 becomes 2005-08-19T00:00:00 |br| 
            08/19/2005 becomes 2005-08-19T00:00:00 |br| 
            The reporting service returns transactions whose date is greater than or equal to the begin date. |br| 
            endDt (str): The end date of the date range in MM/DD/YYYY (or YYYY-MM-DD or YYYY-MM-DDThh:mm:ss) format. This date will be converted to YYYY-MM-DDThh:mm:ss (time is in 24-hour format). If the submitted value does not contain time information, EndDt increments to the next day at midnight, such that no transaction on the desired end date will be excluded based on its time. For example: |br| 
            2005-08-19T12:00:12 is kept as is |br| 
            2005-08-19 becomes 2005-08-20T00:00:00 |br| 
            08/19/2005 becomes 2005-08-20T00:00:00 |br| 
            The reporting service returns transactions whose date is less than the end date. |br| 
            paymentType (str): The type of card used for payment. If provided, only those transactions matching the PaymentType will be included. See Card Payment Type Request Codes on page 34 for valid values. |br| 
            To include multiple payment types, submit each desired type separated by commas. For example: "PAYRECEIPT, SETTLE" will pull all transactions with either PayReceipt or Settle payment types. |br| 
            excludePaymentType (str): Indicates which PaymentType(s) to exclude from the response. If provided, any transaction matching the ExcludePaymentType will be excluded. See Card Payment Type Request Codes on page 34 for valid values. |br| 
            transType (str): The transaction type being performed. If provided, only those transactions matching the TransType will be included. See Transaction Type Request Codes on page 35 for valid values. |br| 
            To include multiple payment types, submit each desired type separated by commas. For example: "Credit,Sale" will pull all transactions with either Credit or Sale transaction types. |br| 
            excludeTransType (str): Indicates which TransType(s) to exclude from the response. If provided, any transaction matching the ExcludeTransType will be excluded. See Transaction Type Request Codes on page 35 for valid values. |br| 
            approvalCode (str): The code returned by PayLeap for approved transactions. If provided, only those transactions matching the ApprovalCode parameter will be included. |br| 
            result (str): The transaction result code from PayLeap. If provided, only those transactions matching the Result will be included. Valid values are: |br| 
            0 (approved) |br| 
            All other values represent a declined transaction. To return all declined transactions, you should leave this field empty and set the ExcludeResult to 0 instead. |br| 
            excludeResult (str): Indicates which Result code(s) to exclude from the response. If provided, any transactions matching the ExcludeResult will be excluded. |br| 
            nameOnCard (str): Cardholder's name as it is appears on the card. If provided, only those transactions with cardholder's name matching NameOnCard will be included. This parameter uses partial matching. For example: "test" matches "test","1test" and "1test234". |br| 
            cardNum (str): A card number. If provided, only those transactions with the cardholder's name matching CardNum will be included. This parameter uses partial matching. |br| 
            cardType (str): A type of credit card. If provided, only those transactions matching the CardType will be included. See Card Type Request Codes on page 35 for valid values. |br| 
            To include multiple payment types, submit each desired type separated by commas. For example, "'VISA,MASTER,DISCOVER" will pull all transactions with either VISA, MASTER and DISCOVER card type. |br| 
            excludeCardType (str): Indicates which CardType(s) to exclude from the response. If provided, any transaction with a card type matching the ExcludeCardType will be excluded. |br| 
            excludeVoid (str): An option to exclude voided transactions. Valid values are: TRUE or FALSE. The default value is TRUE. |br| 
            user (str): The user who originated the transactions. If provided, only those transactions created by the matching User will be included. This parameter uses partial matching. |br| 
            invoiceId (str): The invoice ID that was included in the original transaction. If provided, only those transactions with matching InvoiceId will be included. This parameter uses partial matching. |br| 
            settleFlag (str): An option to retrieve the settled or unsettled transactions. Valid values are: TRUE or FALSE. |br| 
            settleMsg (str): The settlement ID or message returned from the host. |br| 
            settleDt (str): The settlement timestamp in MM/DD/YYYYT00:00:00AM format. |br| 
            transformType (str): The type of format to transform the data into. Currently only supporting XML type |br| 
            xsl (str): Not using for this transformType |br| 
            colDelim (str): Not using for this transformType |br| 
            rowDelim (str): Not using for this transformType |br| 
            includeHeader (str): Not using for this transformType |br| 
            extData (str): An XML string containing additional data for the transaction. See the following section for more information. |br| 
            serverMode (str): Valid values are: PRODUCTION, UAT. |br|
        Returns:
           GetCardTrxRespParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """

        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD

        paramStr = {
            "UserName": userName,
            "Password": password,
            "RPNum": rPNum,
            "PNRef": pNRef,
            "BeginDt": beginDt,
            "EndDt": endDt,
            "PaymentType": paymentType,
            "ExcludePaymentType": excludePaymentType,
            "TransType": transType,
            "ExcludeTransType": excludeTransType,
            "ApprovalCode": approvalCode,
            "Result": result,
            "ExcludeResult": excludeResult,
            "NameOnCard": nameOnCard,
            "CardNum": cardNum,
            "CardType": cardType,
            "ExcludeCardType": excludeCardType,
            "ExcludeVoid": excludeVoid,
            "User": user,
            "InvoiceId": invoiceId,
            "SettleFlag": settleFlag,
            "SettleMsg": settleMsg,
            "SettleDt": settleDt,
            "TransformType": "",
            "Xsl": "",
            "ColDelim": "",
            "RowDelim": "",
            "IncludeHeader": "",
            "ExtData": extData
        }
        response = ConnectionHandler.sendHttpPostRequest(
            paramStr, domain, '/reportingservices.svc/GetCardTrx')

        if isinstance(response, Exception):
            return response
        elif response is not None and response != "":
            cardTrxResponse = GetCardTrxRespParser.parser(response)
            return cardTrxResponse
        else:
            return None
Esempio n. 25
0
    def processDebitCard(transType, cardNum, expDate, magData, nameOnCard,
                         amount, invNum, pNRef, pin, sureChargeAmt,
                         cashBackAmt, registerNum, extData, serverMode):
        r"""This method will help to build the ProcessDebitCard request, to send the same request and after getting it's response will extract it's data and will return the response   

        Args:    
            transType (str): The transaction type being performed. |br| 
            cardNum (str): The debit card number used for the transaction. |br| 
            expDate (str): The expiration date of the debit card used for the transaction in MMYY format. |br| 
            magData (str): The complete raw magnetic stripe data from the card wrapped in single quotes. |br| 
            nameOnCard (str): The cardholder's name as printed on the card. |br| 
            amount (str): The dollar amount of the transaction in DDDDDDDDDD.CC format. This amount includes any cash back or surcharge amounts and any tax or tip amounts specified in ExtData. |br| 
            invNum (str): The invoice number used by the merchant to identify the transaction. |br| 
            pNRef (str): The PNRef number of the original sale transaction being refunded. |br| 
            pin (str): The encrypted PIN block returned by the PIN pad. The transaction will fail if an unencrypted PIN value is used. |br| 
            sureChargeAmt (str): The amount in DDDD.CC format that a merchant charges for processing a debit card transaction. |br| 
            cashBackAmt (str): The amount in DDDD.CC format that a cardholder requests for cash back |br| 
            registerNum (str): Not used |br| 
            extData (str): An XML string containing additional data for the transaction. See the following section for more information. |br| 
            serverMode (str): Valid values are: PRODUCTION, UAT. |br| 
        Returns:
           TransactionXMLParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """

        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD

        paramStr = {
            "UserName": userName,
            "Password": password,
            "TransType": transType,
            "CardNum": cardNum,
            "ExpDate": expDate,
            "MagData": magData,
            "NameOnCard": nameOnCard,
            "Amount": amount,
            "InvNum": invNum,
            "PNRef": pNRef,
            "Pin": pin,
            "SureChargeAmt": sureChargeAmt,
            "CashBackAmt": cashBackAmt,
            "RegisterNum": registerNum,
            "ExtData": extData
        }
        response = ConnectionHandler.sendHttpPostRequest(
            paramStr, domain, '/transactservices.svc/ProcessDebitCard')

        if isinstance(response, Exception):
            return response
        elif response is not None and response != "":
            transactionXMLParser = TransactionXMLParser(response)
            return transactionXMLParser
        else:
            return None
Esempio n. 26
0
    def manageCustomer(
        transType,
        vendor,
        customerKey,
        customerID,
        customerName,
        firstName,
        lastName,
        title,
        department,
        street1,
        street2,
        street3,
        city,
        stateID,
        province,
        zipCode,
        countryID,
        dayPhone,
        nightPhone,
        fax,
        email,
        mobile,
        status,
        extData,
        serverMode,
    ):
        r"""This method will help to build the ManageCustomer request, to send the same request and after getting it's response will extract it's data and will return the response   

        Args:    
            transType (str): The transaction type being performed. Valid values are: |br| 
            Add |br| 
            Update |br| 
            Delete |br| 
            vendor (str): Your PayLeap Vendor number that uniquely identifies your merchant account. |br| 
            customerKey (str): Unique numerical identifier for a customer. Found in the response values for ManageCustomer, AddRecurringCreditCard, and AddRecurringCheck. |br| 
            customerID (str): Unique, merchant-supplied identifier for a customer. |br| 
            customerName (str): Customer's name. |br| 
            firstName (str): Customer's first name. |br| 
            lastName (str): Customer's last name. |br| 
            title (str): Customer's title. |br| 
            department (str): Customer's department. |br| 
            street1 (str): Line 1 of customer's street address. |br| 
            street2 (str): Line 2 of customer's street address.  |br| 
            street3 (str): Line 3 of customer's street address. |br| 
            city (str): Customer's city. |br| 
            stateID (str): Customer's 2-digit state code. |br| 
            province (str): Customer's province if outside the USA. |br| 
            zipCode (str): Customer's ZIP or postal code. |br| 
            countryID (str): Customer's 3-digit country code. For example: USA, CAN. |br| 
            dayPhone (str): Customer's daytime number in ###-###-#### format. |br| 
            nightPhone (str): Customer's nighttime number in ###-###-#### format. |br| 
            fax (str): Customer's fax number in ###-###-#### format. |br| 
            email (str): Customer's billing email address. |br| 
            mobile (str): Customer's mobile number in ###-###-#### format. |br| 
            status (str): Status |br| 
            extData (str): Not used for this operation. |br|      
            serverMode (str): Valid values are: PRODUCTION, UAT. |br|
        Returns:
           MerchantServicesXMLResponseParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """

        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD

        paramStr = {
            "Username": userName,
            "Password": password,
            "TransType": transType,
            "Vendor": vendor,
            "CustomerKey": customerKey,
            "CustomerID": customerID,
            "CustomerName": customerName,
            "FirstName": firstName,
            "LastName": lastName,
            "Title": title,
            "Department": department,
            "Street1": street1,
            "Street2": street2,
            "Street3": street3,
            "City": city,
            "StateID": stateID,
            "Province": province,
            "Zip": zipCode,
            "CountryID": countryID,
            "DayPhone": dayPhone,
            "NightPhone": nightPhone,
            "Fax": fax,
            "Email": email,
            "Mobile": mobile,
            "Status": status,
            "ExtData": extData,
        }
        response = ConnectionHandler.sendHttpPostRequest(paramStr, domain, "/MerchantServices.svc/ManageCustomer")

        if isinstance(response, Exception):
            return response
        elif response is not None:
            merchantServiceResponse = MerchantServicesXMLResponseParser(response)
            return merchantServiceResponse
        else:
            return None
Esempio n. 27
0
    def manageContract(transType, vendor, customerKey, contractKey, paymentInfoKey, paymentType, customerID, 
                customerName, firstName, lastName, title, department, street1, street2, street3, city, 
                stateID, province, zipCode, countryID, email, dayPhone, nightPhone, fax, mobile, contractID, 
                contractName, billAmt, taxAmt, totalAmt, startDate, endDate, nextBillDt, billingPeriod, 
                billingInterval, maxFailures, failureInterval, emailCustomer, emailMerchant, 
                emailCustomerFailure, emailMerchantFailure, status, extData, serverMode):
        r"""This method will help to build the ManageContract request, to send the same request and after getting it's response will extract it's data and will return the response   

        Args:             
            transType (str): The transaction type being performed. Valid values are: |br| 
            Add |br| 
            Update |br| 
            Delete |br| 
            vendor (str): Your PayLeap Vendor number that uniquely identifies your merchant account. |br| 
            customerKey (str): Unique numerical identifier for a customer. Found in the response values for ManageCustomer, AddRecurringCreditCard, and AddRecurringCheck. |br| 
            contractKey (str): Unique numerical identifier for the contract. Found in the response values for AddRecurringCheck and AddRecurringCreditCard. |br| 
            paymentInfoKey (str): Dependent on payment type. For credit cards, use a CcInfoKey or CardInfoKey. For checks, use a CheckInfoKey. |br| 
            These keys can be found in the response values of AddRecurringCreditCard, ManageCreditCardInfo, AddRecurringCheck, and ManageCheckInfo. |br| 
            paymentType (str): Indicates method of payment. Valid values are: |br| 
            CC (for credit card) |br| 
            CK (for check) |br| 
            customerID (str): Unique, merchant supplied identifier for a customer. |br| 
            customerName (str): Customer's name. |br| 
            firstName (str): Customer's first name. |br| 
            lastName (str): Customer's last name. |br| 
            title (str): Customer's title. |br| 
            department (str): Customer's department. |br| 
            street1 (str): Line 1 of customer's street address. |br| 
            street2 (str): Line 2 of customer's street address. |br| 
            street3 (str): Line 3 of customer's street address. |br| 
            city (str): Customer's city. |br| 
            stateID (str): Customer's 2 digit state code. |br| 
            province (str): Customer's province if outside the USA. |br| 
            zipCode (str): Customer's ZIP or postal code. |br| 
            countryID (str): Customer's 3 digit country code. For example: USA, CAN. |br| 
            email (str): Customer's billing email address. |br| 
            dayPhone (str): Customer's daytime number in ###-###-#### format. |br| 
            nightPhone (str): Customer's nighttime number in ###-###-#### format. |br| 
            fax (str): Customer's fax number in ###-###-#### format. |br| 
            mobile (str): Customer's mobile number in ###-###-#### format. |br| 
            contractID (str): Unique, merchant supplied identifier for the contract. |br| 
            contractName (str): Unique, merchant supplied contract name. |br| 
            billAmt (str): The amount to be billed in relation to the contract in DDDDDDDDDD.CC format. |br| 
            taxAmt (str): The tax amount in DDDD.CC format. |br| 
            totalAmt (str): The total amount of the transaction in DDDDDDDDDD.CC format. This includes any tax specified in TaxAmt. |br| 
            startDate (str): Start date of the contract in MM/DD/YYYY format. |br| 
            endDate (str): End date of the contract in MM/DD/YYYY format. If this date is not given, the contract will continue to run until manually cancelled or suspended by the system due to failure of payment. |br| 
            nextBillDt (str): Next billing date in MM/DD/YYYY format. For example: if the next billing date is scheduled to be 01/30/2015, but NextBillDt=02/15/2015 when the request is submitted, the next billing date will change to 02/15/2015. |br| 
            billingPeriod (str): Used in conjunction with BillingInterval to compute next bill date. Valid values are: |br| 
            Day or Daily |br| 
            Week or Weekly |br| 
            Biweekly |br| 
            Month or Monthly |br| 
            Semimonth or Semimonthly |br| 
            Year or Annually |br| 
            Semiannually |br| 
            Quarterly |br| 
            billingInterval (str): Indicates the day on which the billing interval will be applied. |br| 
            For a BillingPeriod of Week/Weekly or Biweekly, valid values are: |br| 
            Mon or 1 |br| 
            Tue or 2 |br| 
            Wed or 3 |br| 
            Thu or 4 |br| 
            Fri or 5 |br| 
            Sat or 6 |br| 
            Sun or 7 |br| 
            For a BillingPeriod of Month/Monthly, valid values are: |br| 
            1 to 31 (the date of the month) |br| 
            Last (the last day of each month) |br| 
            For a BillingPeriod of Day/Daily, Year/Annually, Semiannually, Semimonth/Semimonthly, or Quarterly, set this parameter to 0. The system will calculate the BillingInterval using the StartDate in the contract. |br| 
            maxFailures (str): The maximum number of attempts to submit a payment before system puts contract into a suspended mode. |br| 
            failureInterval (str): The number of days system will wait between each reattempt at processing payment. |br| 
            emailCustomer (str): Indicates whether to email the customer regarding the status of recurring payment. Valid values are: True or False. |br| 
            emailMerchant (str): Indicates whether to email the merchant regarding the status of recurring payment. Valid values are: True or False. |br| 
            emailCustomerFailure (str): Indicates whether to email the customer if recurring payment fails. Valid values are: True or False. |br| 
            emailMerchantFailure (str): Indicates whether to email the merchant if recurring payment fails. Valid values are: True or False. |br| 
            status (str): The status of the contract. Valid values include: |br| 
            Active |br| 
            Inactive |br| 
            extData (str): Not used for this operation. |br| 
            serverMode (str): Valid values are: PRODUCTION, UAT. |br|
        Returns:
           MerchantServicesXMLResponseParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """
        
        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD
            
        paramStr = {
                    "Username" : userName,
                    "Password" : password,
                    "TransType" : transType,
                    "Vendor" : vendor,
                    "CustomerKey" : customerKey,
                    "ContractKey" : contractKey,
                    "PaymentInfoKey" : paymentInfoKey,
                    "PaymentType" : paymentType,
                    "CustomerID" : customerID,
                    "CustomerName" : customerName,
                    "FirstName" : firstName,
                    "LastName" : lastName,
                    "Title" : title,
                    "Department" : department,
                    "Street1" : street1,
                    "Street2" : street2,
                    "Street3" : street3,
                    "City" : city,
                    "StateID" : stateID,
                    "Province" : province,
                    "Zip" : zipCode,
                    "CountryID" : countryID,
                    "Email" : email,
                    "DayPhone" : dayPhone,
                    "NightPhone" : nightPhone,
                    "Fax" : fax,
                    "Mobile" : mobile,
                    "ContractID" : contractID,
                    "ContractName" : contractName,
                    "BillAmt" : billAmt,
                    "TaxAmt" : taxAmt,
                    "TotalAmt" : totalAmt,
                    "StartDate" : startDate,
                    "EndDate" : endDate,
                    "NextBillDt" : nextBillDt,
                    "BillingPeriod" : billingPeriod,
                    "BillingInterval" : billingInterval,
                    "MaxFailures" : maxFailures,
                    "FailureInterval" : failureInterval,
                    "EmailCustomer" : emailCustomer,
                    "EmailMerchant" : emailMerchant,
                    "EmailCustomerFailure" : emailCustomerFailure,
                    "EmailMerchantFailure" : emailMerchantFailure,
                    "Status" : status,
                    "ExtData" : extData
        }
        response = ConnectionHandler.sendHttpPostRequest(paramStr, domain, '/MerchantServices.svc/ManageContract')
        
        if isinstance(response, Exception):
            return response
        elif response is not None:
            merchantServiceResponse = MerchantServicesXMLResponseParser(response)
            return merchantServiceResponse;
        else:
            return None
Esempio n. 28
0
    def manageCreditCardInfo(transType, vendor, customerKey, cardInfoKey,
                             ccAccountNum, ccExpDate, ccNameonCard, ccStreet,
                             ccZip, extData, serverMode):
        r"""This method will help to build the ManageCreditCardInfo request, to send the same request and after getting it's response will extract it's data and will return the response   

        Args:             
            transType (str): The transaction type being performed. Valid values are: |br| 
            Add |br| 
            Update |br| 
            Delete |br| 
            vendor (str): Your PayLeap Vendor number that uniquely identifies your merchant account. |br| 
            customerKey (str): Unique numerical identifier for a customer. Found in the response values of operations for managing customer information and adding recurring payments. |br| 
            cardInfoKey (str): Unique numerical identifier for credit card. Found in the response values for AddRecurringCreditCard as the CcInfoKey. |br| 
            ccAccountNum (str): Credit card number used for the transaction. |br| 
            ccExpDate (str): Expiration date of the credit card used for the transaction in MMYY format. |br| 
            ccNameonCard  (str): Cardholder's name as printed on the card. |br| 
            ccStreet (str): Cardholder's street address. Used for AVS. |br| 
            ccZip (str): Cardholder's billing ZIP or postal code. Used for AVS. |br| 
            extData (str): Not used for this operation. |br| 
            serverMode (str): Valid values are: PRODUCTION, UAT. |br|
        Returns:
           MerchantServicesXMLResponseParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """

        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD

        paramStr = {
            "Username": userName,
            "Password": password,
            "TransType": transType,
            "Vendor": vendor,
            "CustomerKey": customerKey,
            "CardInfoKey": cardInfoKey,
            "CcAccountNum": ccAccountNum,
            "CcExpDate": ccExpDate,
            "CcNameonCard": ccNameonCard,
            "CcStreet": ccStreet,
            "CcZip": ccZip,
            "ExtData": extData
        }
        response = ConnectionHandler.sendHttpPostRequest(
            paramStr, domain, '/MerchantServices.svc/ManageCreditCardInfo')

        if isinstance(response, Exception):
            return response
        elif response is not None:
            merchantServiceResponse = MerchantServicesXMLResponseParser(
                response)
            return merchantServiceResponse
        else:
            return None
    def manageCheckInfo(transType, vendor, customerKey, checkInfoKey,
                        checkType, accountType, checkNum, mICR, accountNum,
                        transitNum, sS, dOB, branchCity, dL, stateCode,
                        nameOnCheck, email, dayPhone, street1, street2,
                        street3, city, stateID, province, postalCode,
                        countryID, extData, serverMode):
        r"""This method will help to build the ManageCheckInfo request, to send the same request and after getting it's response will extract it's data and will return the response   

        Args:             
            transType (str): The transaction type being performed. Valid values are: |br| 
            Add |br| 
            Update |br| 
            Delete |br| 
            vendor (str): Your PayLeap Vendor number that uniquely identifies your merchant account. |br| 
            customerKey (str): Unique numerical identifier for the customer. Found in the response values of operations for managing customer information and adding recurring payments. |br| 
            checkInfoKey (str): Unique numerical identifier for check. Found in the response values for AddRecurringCheck. |br| 
            checkType (str): Indicates check type. Valid values are: |br| 
            Personal |br| 
            Business |br| 
            accountType (str): Indicates to which type of account the check points. Valid values are: |br| 
            Checking |br| 
            Savings |br| 
            checkNum (str): The check number printed on the check. |br| 
            mICR (str): The scanned MICR data of the check. |br| 
            accountNum (str): The account number printed on the check. |br| 
            transitNum (str): The routing number printed on the check. |br| 
            sS (str): The customer's Social Security Number in ###-###-#### format. |br| 
            dOB  (str): The customer's date of birth in MM/DD/YYYY format. |br| 
            branchCity (str): The city in which the branch of the bank is located. |br| 
            dL (str): The customer's date of birth in MM/DD/YYYY format. |br| 
            stateCode (str): The customer's two-digit driver's license state or province code. |br| 
            nameOnCheck (str): The customer's name as printed on the check. |br| 
            email (str): Customer's billing email address. |br| 
            dayPhone (str): Customer's phone number in ###-###-#### format. |br| 
            street1 (str): Line 1 of customer's street address. |br| 
            street2 (str): Line 2 of customer's street address. |br| 
            street3 (str): Line 3 of customer's street address. |br| 
            city (str): Customer's city. |br| 
            stateID (str): Customer's 2-digit state code. |br| 
            province (str): Customer's province if outside the USA. |br| 
            postalCode  (str): Customer's ZIP or postal code. |br| 
            countryID (str): Customer's 3-digit country code. For example: USA, CAN. |br| 
            extData (str): Not used for this operation. |br| 
            serverMode (str): Valid values are: PRODUCTION, UAT. |br| 
        Returns:
           MerchantServicesXMLResponseParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """

        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD

        paramStr = {
            "Username": userName,
            "Password": password,
            "TransType": transType,
            "Vendor": vendor,
            "CustomerKey": customerKey,
            "CheckInfoKey": checkInfoKey,
            "CheckType": checkType,
            "AccountType": accountType,
            "CheckNum": checkNum,
            "MICR": mICR,
            "AccountNum": accountNum,
            "TransitNum": transitNum,
            "SS": sS,
            "DOB": dOB,
            "BranchCity": branchCity,
            "DL": dL,
            "StateCode": stateCode,
            "NameOnCheck": nameOnCheck,
            "Email": email,
            "DayPhone": dayPhone,
            "Street1": street1,
            "Street2": street2,
            "Street3": street3,
            "City": city,
            "StateID": stateID,
            "Province": province,
            "PostalCode": postalCode,
            "CountryID": countryID,
            "ExtData": extData
        }
        response = ConnectionHandler.sendHttpPostRequest(
            paramStr, domain, '/MerchantServices.svc/ManageCheckInfo')

        if isinstance(response, Exception):
            return response
        elif response is not None:
            merchantServiceResponse = MerchantServicesXMLResponseParser(
                response)
            return merchantServiceResponse
        else:
            return None
    def getCardTrxSummary(rPNum, beginDt, endDt, approvalCode, register, nameOnCard, cardNum, cardType, excludeVoid, 
                user, settleFlag, settleMsg, settleDt, transformType, xsl, colDelim, rowDelim, 
                includeHeader, extData, serverMode):
        r"""This method will help to build the GetCardTrxSummary request, to send the same request and after getting it's response will extract it's data and will return the response   

        Args:  
            rPNum (str): Your PayLeap Vendor number that uniquely identifies your merchant account. |br| 
            beginDt (str): The begin date of the date range in MM/DD/YYYY format. |br| 
            endDt (str): The inclusive end date of the date range in MM/DD/YYYY format. |br| 
            approvalCode (str): The code returned by PayLeap for approved transactions. If provided, only those transactions matching the ApprovalCode parameter will be included. |br| 
            register (str): The register that originated the transaction. If provided, only those transactions with the matching register will be included. |br| 
            nameOnCard (str): Cardholder's name as it is appears on the card. If provided, only those transactions with cardholder's name matching NameOnCard will be included. This parameter uses partial matching. For example: "test" matches "test","1test" and "1test234". |br| 
            cardNum (str): A card number. If provided, only those transactions with the cardholder's name matching CardNum will be included. This parameter uses partial matching. |br| 
            cardType (str): A type of credit card. If provided, only those transactions matching the CardType will be included. See Card Type Request Codes on page 35 for valid values. |br| 
            To include multiple payment types, submit each desired type separated by commas. For example, "'VISA,MASTER,DISCOVER" will pull all transactions with either VISA, MASTER and DISCOVER card type. |br| 
            excludeVoid (str): An option to exclude voided transactions. Valid values are: TRUE or FALSE. The default value is TRUE. |br| 
            user (str): The user who originated the transactions. If provided, only those transactions created by the matching User will be included. This parameter uses partial matching. |br| 
            settleFlag (str): An option to retrieve the settled transactions or unsettled transactions. Valid values are: TRUE or FALSE. |br| 
            settleMsg (str): The settlement ID or message returned from the host. |br| 
            settleDt (str): The settlement timestamp in MM/DD/YYYYT00:00:00AM format. |br| 
            transformType (str): The type of format to transform the data into. Currently only supporting XML type |br| 
            xsl (str): Not using for this transformType |br| 
            colDelim (str): Not using for this transformType |br| 
            rowDelim (str): Not using for this transformType |br| 
            includeHeader (str): Not using for this transformType |br| 
            extData (str): Not used for this operation. |br|        
            serverMode (str): Valid values are: PRODUCTION, UAT. |br|
            
        Returns:
           GetCardTrxSummaryRespParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """
        
        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD
            
        paramStr = {
                    "UserName" : userName,
                    "Password" : password,
                    "RPNum"  : rPNum,
                    "BeginDt"  : beginDt,
                    "EndDt"  : endDt,
                    "ApprovalCode"  : approvalCode, 
                    "Register"  : register,
                    "NameOnCard"  : nameOnCard,
                    "CardNum"  : cardNum,
                    "CardType"  : cardType,
                    "ExcludeVoid"  : excludeVoid,
                    "User"  : user,
                    "SettleFlag"  : settleFlag, 
                    "SettleMsg"  : settleMsg,
                    "SettleDt"  : settleDt,
                    "TransformType"  : "",
                    "Xsl"  : "",
                    "ColDelim"  : "", 
                    "RowDelim"  : "",
                    "IncludeHeader"  : "", 
                    "ExtData"  : extData
        }
        response = ConnectionHandler.sendHttpPostRequest(paramStr, domain, '/reportingservices.svc/GetCardTrxSummary')
        
        if isinstance(response, Exception):
            return response
        elif response is not None and response != "":
            cardTrxSummaryRespParser = GetCardTrxSummaryRespParser.parser(response);
            return cardTrxSummaryRespParser;
        else:
            return None
Esempio n. 31
0
    def getCardTrx(
        rPNum,
        pNRef,
        beginDt,
        endDt,
        paymentType,
        excludePaymentType,
        transType,
        excludeTransType,
        approvalCode,
        result,
        excludeResult,
        nameOnCard,
        cardNum,
        cardType,
        excludeCardType,
        excludeVoid,
        user,
        invoiceId,
        settleFlag,
        settleMsg,
        settleDt,
        transformType,
        xsl,
        colDelim,
        rowDelim,
        includeHeader,
        extData,
        serverMode,
    ):
        r"""This method will help to build the GetCardTrx request, to send the same request and after getting it's response will extract it's data and will return the response   

        Args:             
            rPNum (str): Your PayLeap Vendor number that uniquely identifies your merchant account. |br| 
            pNRef (str): To search for a single transaction, provide the unique payment reference number assigned to the transaction. If this field is provided, all other query fields are ignored. |br| 
            beginDt (str): The begin date of the date range in MM/DD/YYYY (or YYYY-MM-DD or YYYY-MM-DDThh:mm:ss) format. This date will be converted to YYYY-MM-DDThh:mm:ss (time is in 24-hour format). If the submitted value does not contain time information, BeginDt will default to midnight on the given date. For example: |br| 
            2005-08-19T12:00:12 is kept as is |br| 
            2005-08-19 becomes 2005-08-19T00:00:00 |br| 
            2005/08/19 becomes 2005-08-19T00:00:00 |br| 
            08/19/2005 becomes 2005-08-19T00:00:00 |br| 
            The reporting service returns transactions whose date is greater than or equal to the begin date. |br| 
            endDt (str): The end date of the date range in MM/DD/YYYY (or YYYY-MM-DD or YYYY-MM-DDThh:mm:ss) format. This date will be converted to YYYY-MM-DDThh:mm:ss (time is in 24-hour format). If the submitted value does not contain time information, EndDt increments to the next day at midnight, such that no transaction on the desired end date will be excluded based on its time. For example: |br| 
            2005-08-19T12:00:12 is kept as is |br| 
            2005-08-19 becomes 2005-08-20T00:00:00 |br| 
            08/19/2005 becomes 2005-08-20T00:00:00 |br| 
            The reporting service returns transactions whose date is less than the end date. |br| 
            paymentType (str): The type of card used for payment. If provided, only those transactions matching the PaymentType will be included. See Card Payment Type Request Codes on page 34 for valid values. |br| 
            To include multiple payment types, submit each desired type separated by commas. For example: "PAYRECEIPT, SETTLE" will pull all transactions with either PayReceipt or Settle payment types. |br| 
            excludePaymentType (str): Indicates which PaymentType(s) to exclude from the response. If provided, any transaction matching the ExcludePaymentType will be excluded. See Card Payment Type Request Codes on page 34 for valid values. |br| 
            transType (str): The transaction type being performed. If provided, only those transactions matching the TransType will be included. See Transaction Type Request Codes on page 35 for valid values. |br| 
            To include multiple payment types, submit each desired type separated by commas. For example: "Credit,Sale" will pull all transactions with either Credit or Sale transaction types. |br| 
            excludeTransType (str): Indicates which TransType(s) to exclude from the response. If provided, any transaction matching the ExcludeTransType will be excluded. See Transaction Type Request Codes on page 35 for valid values. |br| 
            approvalCode (str): The code returned by PayLeap for approved transactions. If provided, only those transactions matching the ApprovalCode parameter will be included. |br| 
            result (str): The transaction result code from PayLeap. If provided, only those transactions matching the Result will be included. Valid values are: |br| 
            0 (approved) |br| 
            All other values represent a declined transaction. To return all declined transactions, you should leave this field empty and set the ExcludeResult to 0 instead. |br| 
            excludeResult (str): Indicates which Result code(s) to exclude from the response. If provided, any transactions matching the ExcludeResult will be excluded. |br| 
            nameOnCard (str): Cardholder's name as it is appears on the card. If provided, only those transactions with cardholder's name matching NameOnCard will be included. This parameter uses partial matching. For example: "test" matches "test","1test" and "1test234". |br| 
            cardNum (str): A card number. If provided, only those transactions with the cardholder's name matching CardNum will be included. This parameter uses partial matching. |br| 
            cardType (str): A type of credit card. If provided, only those transactions matching the CardType will be included. See Card Type Request Codes on page 35 for valid values. |br| 
            To include multiple payment types, submit each desired type separated by commas. For example, "'VISA,MASTER,DISCOVER" will pull all transactions with either VISA, MASTER and DISCOVER card type. |br| 
            excludeCardType (str): Indicates which CardType(s) to exclude from the response. If provided, any transaction with a card type matching the ExcludeCardType will be excluded. |br| 
            excludeVoid (str): An option to exclude voided transactions. Valid values are: TRUE or FALSE. The default value is TRUE. |br| 
            user (str): The user who originated the transactions. If provided, only those transactions created by the matching User will be included. This parameter uses partial matching. |br| 
            invoiceId (str): The invoice ID that was included in the original transaction. If provided, only those transactions with matching InvoiceId will be included. This parameter uses partial matching. |br| 
            settleFlag (str): An option to retrieve the settled or unsettled transactions. Valid values are: TRUE or FALSE. |br| 
            settleMsg (str): The settlement ID or message returned from the host. |br| 
            settleDt (str): The settlement timestamp in MM/DD/YYYYT00:00:00AM format. |br| 
            transformType (str): The type of format to transform the data into. Currently only supporting XML type |br| 
            xsl (str): Not using for this transformType |br| 
            colDelim (str): Not using for this transformType |br| 
            rowDelim (str): Not using for this transformType |br| 
            includeHeader (str): Not using for this transformType |br| 
            extData (str): An XML string containing additional data for the transaction. See the following section for more information. |br| 
            serverMode (str): Valid values are: PRODUCTION, UAT. |br|
        Returns:
           GetCardTrxRespParser. Will populated using XML response.   
    
        Raises:
           Exception, For all type of exceptions    
        """

        if serverMode == "UAT":
            domain = ConstantResources.UAT_SERVER_URL
            userName = ConstantResources.UAT_USER_ID
            password = ConstantResources.UAT_USER_PASSWORD
        else:
            domain = ConstantResources.PRODUCTION_SERVER_URL
            userName = ConstantResources.PRODUCTION_USER_ID
            password = ConstantResources.PRODUCTION_USER_PASSWORD

        paramStr = {
            "UserName": userName,
            "Password": password,
            "RPNum": rPNum,
            "PNRef": pNRef,
            "BeginDt": beginDt,
            "EndDt": endDt,
            "PaymentType": paymentType,
            "ExcludePaymentType": excludePaymentType,
            "TransType": transType,
            "ExcludeTransType": excludeTransType,
            "ApprovalCode": approvalCode,
            "Result": result,
            "ExcludeResult": excludeResult,
            "NameOnCard": nameOnCard,
            "CardNum": cardNum,
            "CardType": cardType,
            "ExcludeCardType": excludeCardType,
            "ExcludeVoid": excludeVoid,
            "User": user,
            "InvoiceId": invoiceId,
            "SettleFlag": settleFlag,
            "SettleMsg": settleMsg,
            "SettleDt": settleDt,
            "TransformType": "",
            "Xsl": "",
            "ColDelim": "",
            "RowDelim": "",
            "IncludeHeader": "",
            "ExtData": extData,
        }
        response = ConnectionHandler.sendHttpPostRequest(paramStr, domain, "/reportingservices.svc/GetCardTrx")

        if isinstance(response, Exception):
            return response
        elif response is not None and response != "":
            cardTrxResponse = GetCardTrxRespParser.parser(response)
            return cardTrxResponse
        else:
            return None