Reply
Member
Posts: 4
Registered: ‎08-19-2010

No response to capture request using CIM

[ Edited ]

I am trying to switch to using CIM and Api call to authoriza and later capture transactions.  Everything is successful up to capturing the authorized amount.  I am sending the API call and getting back no response (and nothing happening on the server).  This is the code I am using, which is basically the same code I used to do the authorization which worked just fine with the fields switched to send what I think are the proper fields.   Have tried using profileTransPriorAuthCapture and profileTransCaptureOnly both and neither returns anything.  Can anyone help?  Site is programmed in classic ASP.

 

strReq = "<?xml version=""1.0"" encoding=""utf-8""?>" _
& "<createCustomerProfileTransactionRequest xmlns=""AnetApi/xml/v1/schema/AnetApiSchema.xsd"">" _
& MerchantAuthentication() _
& "<transaction>" _
& " <profileTransPriorAuthCapture>" _
& " <amount>" & Cdbl(GRAND_TOTAL) & "</amount>" _
& " <customerProfileId>" & ANETID & "</customerProfileId>" _
& " <customerPaymentProfileId>" & PROFID & "</customerPaymentProfileId>" _
& " <order>" _
& " <invoiceNumber>" & ORDER_ID & "</invoiceNumber>" _
& " <description>From Nature With Love Order #" & ORDER_ID & "</description>" _
& " </order>" _
& " <transId>" & AuthTransID & "</transId>" _
& " <approvalCode>" & AuthApprovalCode & "</approvalCode>" _
& " </profileTransPriorAuthCapture>" _
& "</transaction>" _
& "</createCustomerProfileTransactionRequest>"

 

Set objResponse = SendApiRequest(strReq)

 

 

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: No response to capture request using CIM

[ Edited ]

profileTransPriorAuthCapture don't use approvedCode. but that shouldn't stop it from sending

Can you look at the strreq before you do the SendApiRequest

on the auth_only did you use the # in the description?

Member
Posts: 4
Registered: ‎08-19-2010

Re: No response to capture request using CIM

I did not use the # in the description for the authorization so tried taking it out and it didn't make any difference, here is the authorization:

 

strReq = "<?xml version=""1.0"" encoding=""utf-8""?>" _
& "<createCustomerProfileTransactionRequest xmlns=""AnetApi/xml/v1/schema/AnetApiSchema.xsd"">" _
& MerchantAuthentication() _
& "<transaction>" _
& " <profileTransAuthOnly>" _
& " <amount>" & Cdbl(grand_total) & "</amount>" _
& " <customerProfileId>" & ANETID & "</customerProfileId>" _
& " <customerPaymentProfileId>" & PROFID & "</customerPaymentProfileId>" _
& " <order>" _
& " <invoiceNumber>" & ORDER_NO & "</invoiceNumber>" _
& " <description>From Nature With Love Order No " & order_id & "</description>" _
& " </order>" _
& " <cardCode>" & CVVS & "</cardCode>" _
& " </profileTransAuthOnly>" _
& "</transaction>" _
& "</createCustomerProfileTransactionRequest>"

 

then I tried cutting it down as much as I thought I could: to this, but still nothing is returned

 

strReq = "<?xml version=""1.0"" encoding=""utf-8""?>" _
& "<createTransactionRequest xmlns=""AnetApi/xml/v1/schema/AnetApiSchema.xsd"">" _
& MerchantAuthentication() _
& "<transactionRequest>" _
& " <transactionType>priorAuthCaptureTransaction</transactionType>" _
& " <amount>" & Cdbl(GRAND_TOTAL) & "</amount>" _
& " <transId>" & AuthTransID & "</transId>" _
& "</transactionRequest>" _
& "</createTransactionRequest>"

 

I can view the string, it looks like this if I response.write it: (replaced the real codes, of course)

 

6xxxxxxxS 6xxxxxxxxxxx3 priorAuthCaptureTransaction 0.01 699999993

 

 

 

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: No response to capture request using CIM

[ Edited ]

The raw response in  SendApiRequest() is blank too? Are you using createCustomerProfileTransactionRequest  or createTransactionRequest 

Member
Posts: 4
Registered: ‎08-19-2010

Re: No response to capture request using CIM

I have tried both createCustomerProfileTransactionRequest and createTransactionRequest.

 

There seems to be no raw response or its blank, I do :

 


Set objResponse = SendApiRequest(strReq)


Set objDirectResponse = objResponse.selectSingleNode("/*/api:directResponse")
If Not (objDirectResponse Is Nothing) Then

    do some other stuff

else

Response.Write("No response received<hr>")

end if

 

and all I get back is "No Response Received"

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: No response to capture request using CIM

You assuming the there is a directResponse? how about the raw objResponse?

Member
Posts: 4
Registered: ‎08-19-2010

Re: No response to capture request using CIM

If I response write the raw objResponse then I get nothing.

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: No response to capture request using CIM

Look into the function SendApiRequest and see what is failing.