cancel
Showing results for 
Search instead for 
Did you mean: 

VBA error in sandbox

This is really bizarre.  I have two Access applications running a test app and a client app.

In the test app, I have used the following to post a request and get a response, and it works fine:

 

Test App
Post_URL: https://test.authorize.net/gateway/transact.dll
Post string:x_login=mylogin&x_tran_key=mykey&x_delim_data=TRUE&

x_delim_char=|&x_relay_response=FALSE&x_type=AUTH_CAPTURE&

x_method=CC&x_card_num=4111111111111111&x_exp_date=0320&

x_amount=608.78&x_description=My%20Client%20Name%20&

x_invoice_num=79012

 

The code that actually posts this looks like:

Dim objRequest As New MSXML2.XMLHTTP
objRequest.Open "POST", TempVars!Post_Url, False
objRequest.send post_string
post_response = objRequest.responseText

 

And the response looks like:

1|1|1|This transaction has been approved.|0L2DGF|Y|60139380095|79012|My Client Name|608.76|CC|auth_capture|||||||||||||||||||||||||||P|2|||||||||||XXXX1111|Visa|||||||KUSP422B9Z14N6LIB9XSZ1F||||||||||

 

But when I run basically this with basically an identical post string in the client application:

 

My Client Name
URL: https://test.authorize.net/gateway/transact.dll
Post: x_login=mylogin&x_tran_key=mykey&x_delim_data=TRUE&

x_delim_char=|&x_relay_response=FALSE&x_type=AUTH_CAPTURE&

x_method=CC&x_card_num=4111111111111111&x_exp_date=0320&

x_amount=608.78&x_description=My%20Client%20Name%20&

x_invoice_num=04168

 

I get an error message: -2147467259 Unspecified error

 

and the line of code that is highlighted, generating the error is:

 

objRequest.send post_string

 

The Invoice_Num value in both of these applications is based on:

x_invoice_num=" & URLEncode(Right(Timer * 100, 5))

to avoid duplicates

 

The code in the test application works fine, every time returning approved and unapproved messages depending on the values passed, but the client application is returning this error, every time it is run.

 

I am beyond frustrated!

dalefye1
Member
0 REPLIES 0