Hello,
I am having a very similar problem, when running in live mode and processing transactions by charging to a stored profile several transactions will go through fine and then during the same session they will start to fail with error code E00040 - CUSTOMER PROFILE ID OR CUSTOMER PAYMENT PROFILE ID NOT FOUND, and it seems that once the first one fails the rest of the transactions during that session will fail, yet if you lookup the profile and payment profile they are both correct in all cases below.
Below are results of what is being sent and received.
SUCCESSFUL TRANSACTION
SENT:
<?xml version="1.0" encoding="UTF-8"?>
<createCustomerProfileTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>********</name>
<transactionKey>****************</transactionKey>
</merchantAuthentication>
<transaction>
<profileTransAuthCapture>
<amount>79.79</amount>
<customerProfileId>*****087</customerProfileId>
<customerPaymentProfileId>***895</customerPaymentProfileId>
<order>
<invoiceNumber>CHG20111107******</invoiceNumber>
<description>Monthly Billing</description>
</order>
<recurringBilling>false</recurringBilling>
</profileTransAuthCapture>
</transaction>
</createCustomerProfileTransactionRequest>
RESPONSE:
<?xml version="1.0" encoding="utf-8"?><createCustomerProfileTransactionResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"><messages><resultCode>Ok</resultCode><message><code>I00001</code><text>Successful.</text></message></messages><directResponse>1,1,1,This transaction has been approved.,******,Y,**********,CHG20111107******,Monthly Billing,79.79,CC,auth_capture,******,****** **** ***** ***,,****** **** ***** ***,*** *** **,*******,**,*****,,,,,,,,,,,,,,,,,,********************************,,,,,,,,,,,,,XXXX****,Visa,,,,,,,,,,,,,,,,</directResponse></createCustomerProfileTransactionResponse>
UNSUCCESSFUL TRANSATION
SENT:
<?xml version="1.0" encoding="UTF-8"?>
<createCustomerProfileTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>********</name>
<transactionKey>****************</transactionKey>
</merchantAuthentication>
<transaction>
<profileTransAuthCapture>
<amount>50.00</amount>
<customerProfileId>*****965</customerProfileId>
<customerPaymentProfileId>*****400</customerPaymentProfileId>
<order>
<invoiceNumber>CHG20111107******</invoiceNumber>
<description>Monthly Billing</description>
</order>
<recurringBilling>false</recurringBilling>
</profileTransAuthCapture>
</transaction>
</createCustomerProfileTransactionRequest>
RESPONSE:
<?xml version="1.0" encoding="utf-8"?><createCustomerProfileTransactionResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"><messages><resultCode>Error</resultCode><message><code>E00040</code><text>Customer Profile ID or Customer Payment Profile ID not found.</text></message></messages></createCustomerProfileTransactionResponse>
UNSUCCESSFUL TRANSATION
SENT:
<?xml version="1.0" encoding="UTF-8"?>
<createCustomerProfileTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>********</name>
<transactionKey>****************</transactionKey>
</merchantAuthentication>
<transaction>
<profileTransAuthCapture>
<amount>51.38</amount>
<customerProfileId>*****178</customerProfileId>
<customerPaymentProfileId>*****683</customerPaymentProfileId>
<order>
<invoiceNumber>CHG20111107******</invoiceNumber>
<description>Monthly Billing</description>
</order>
<recurringBilling>false</recurringBilling>
</profileTransAuthCapture>
</transaction>
</createCustomerProfileTransactionRequest>
RESPONSE:
<?xml version="1.0" encoding="utf-8"?><createCustomerProfileTransactionResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"><messages><resultCode>Error</resultCode><message><code>E00040</code><text>Customer Profile ID or Customer Payment Profile ID not found.</text></message></messages></createCustomerProfileTransactionResponse>