Skip to content

Get Transaction Details Info Errror #109

Open
@rpoole

Description

@rpoole

We are getting a Create Document Exception: <class 'pyxb.exceptions_.ContentNondeterminismExceededError'>, (<authorizenet.apicontractsv1. customerAddressType object at 0x7f2ecf0129b0> every time we pull transaction details from the API. The error is occurring on line 149 of apicontrollersbase.py.

The code being used to fetch the transaction details is (some login settings omitted)

from authorizenet import apicontractsv1
from authorizenet.apicontrollers import getTransactionDetailsController

    def verify_transaction(self, transaction_id, amount):
        logging.debug("Verifyng transaction id %s" % transaction_id)
        transaction_details_request = apicontractsv1.getTransactionDetailsRequest()
        transaction_details_request.merchantAuthentication = self.merchantAuth
        transaction_details_request.transId = transaction_id

        transaction_details_controller = getTransactionDetailsController(transaction_details_request)
        transaction_details_controller.setenvironment(self.environment)

        transaction_details_controller.execute()

        transaction_details_response = transaction_details_controller.getresponse()

        if transaction_details_response is None or transaction_details_response.messages.resultCode != apicontractsv1.messageTypeEnum.Ok or transaction_details_response.transaction.transactionStatus != 'capturedPendingSettlement' or transaction_details_response.transaction.authAmount != amount:
                    return False

        return True

The XML being returned from the sandbox API is:

<?xml version="1.0" encoding="UTF-8"?>
<getTransactionDetailsResponse xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <messages>
      <resultCode>Ok</resultCode>
      <message>
         <code>I00001</code>
         <text>Successful.</text>
      </message>
   </messages>
   <transaction>
      <transId>40014999477</transId>
      <submitTimeUTC>2018-06-15T15:07:53.33Z</submitTimeUTC>
      <submitTimeLocal>2018-06-15T08:07:53.33</submitTimeLocal>
      <transactionType>authCaptureTransaction</transactionType>
      <transactionStatus>capturedPendingSettlement</transactionStatus>
      <responseCode>1</responseCode>
      <responseReasonCode>1</responseReasonCode>
      <responseReasonDescription>Approval</responseReasonDescription>
      <authCode>THPCHV</authCode>
      <AVSResponse>Y</AVSResponse>
      <cardCodeResponse>P</cardCodeResponse>
      <authAmount>240.00</authAmount>
      <settleAmount>240.00</settleAmount>
      <taxExempt>false</taxExempt>
      <payment>
         <creditCard>
            <cardNumber>XXXX1111</cardNumber>
            <expirationDate>XXXX</expirationDate>
            <cardType>Visa</cardType>
         </creditCard>
      </payment>
      <billTo>
         <firstName>2</firstName>
         <lastName>2</lastName>
         <address>add</address>
         <city>City</city>
         <state>VA</state>
         <zip>20176</zip>
         <country>USA</country>
         <phoneNumber>2222222222</phoneNumber>
      </billTo>
      <recurringBilling>false</recurringBilling>
      <customerIP>11.111.1.11</customerIP>
      <product>Card Not Present</product>
      <marketType>eCommerce</marketType>
   </transaction>
   <clientId>accept-hosted</clientId>
</getTransactionDetailsResponse>

We are seeing this error when hitting the live API as well. It doesn't appear to cause any issues, as payments still process fine, but seeing the error in our logs is concerning.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions