Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Transaction Details Info Errror #109

Open
rpoole opened this issue Jun 15, 2018 · 3 comments
Open

Get Transaction Details Info Errror #109

rpoole opened this issue Jun 15, 2018 · 3 comments

Comments

@rpoole
Copy link

rpoole commented Jun 15, 2018

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.

@Sapbasu15
Copy link
Contributor

@rpoole the error is coming from the pyxb library but doesn't seem to interrupt the flow. We'll be looking into the error.

@sanaani
Copy link

sanaani commented Jul 5, 2018

I get the same error.

@PauloPeres
Copy link

I'm still getting the same error, i know it does not affect anything but the error is still triggering.
Using latest versions of PyXB and AuthorizeNet/SDK-Python

PyXB==1.2.6
authorizenet==1.1.2

I believe the XML line numbers are not matching anymore.

[error_report] [Django] ERROR: Create Document Exception:<class 'pyxb.exceptions_.ContentNondeterminismExceededError'>,(<lib.authorize_net_sdk.authorizenet.apicontractsv1.customerAddressTypeobject at 0x7f853427c7b8>,)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants