Reply
Member
Posts: 2
Registered: ‎03-15-2019

Accept Hosted - transactionRequestType.Order causes Unexpected Error

ASP.Net

 

I have tried exacly what is in the sample code:

https://developer.authorize.net/api/reference/features/accept_hosted.html

 

...by going to this link for the  sample code

https://developer.authorize.net/api/reference/#accept-suite-get-an-accept-payment-page

 

SAMPLE CODE:

var transactionRequest = new transactionRequestType
{
transactionType = transactionTypeEnum.authCaptureTransaction.ToString(), // authorize capture only
amount = amount,
order = new orderType
{
invoiceNumber = "INV-123456",
description = "TEST INVOICE"
}
};

 

Almost everything runs fine, right up to pressing the "Pay" button, then I get:

"Unexpected error. Please try again."

 

When I comment out the "order = new orderType..." section of the code, EVERYTHING then runs perfectly - the tranaction goes through, the receipt is displayed, email with receipt is received...

 

However, I do *NOT* get the invoiceNumber in the order - because I didn't set the values to avoid this weird "Unexpected error...".

 

I've ONLY tried this in the Sandbox.

 

I've also stepped through the code, and the values ARE proerly set before the nonce Token is created.

 

It's been many hours hunting for an answer - I can't believe I'm the first person to copy the sample code and have it blow up...

 

Thoughts?

Member
Posts: 2
Registered: ‎03-15-2019

Re: Accept Hosted - transactionRequestType.Order causes Unexpected Error

SOLVED - temporarily...

 

Rolled back the ASP.NET Authroize.Net SDK from version 2.0.0 to version 1.9.6

 

I found this posting saying 1.9.7 and 2.0.0 both have issues:
https://community.developer.authorize.net/t5/Integration-and-Testing/OrderType-is-causing-Unexpected...

 

 

Member
Posts: 6
Registered: ‎02-19-2020

Re: Accept Hosted - transactionRequestType.Order causes Unexpected Error

This is crazy.  I commented out the New Order information.  Who supports this code?

The bug was identified a year and a half ago!

Member
Posts: 3
Registered: ‎10-25-2020

Re: Accept Hosted - transactionRequestType.Order causes Unexpected Error

i have same issue kindly suggest a solution please.

Member
Posts: 3
Registered: ‎10-25-2020

Re: Accept Hosted - transactionRequestType.Order causes Unexpected Error

please help me out 

Member
Posts: 1
Registered: ‎10-26-2020

Re: Accept Hosted - transactionRequestType.Order causes Unexpected Error

I was checking steadily this online journal and I'm awed! significant data phenomenally the last part I deal with such data a great deal. I am lively to discover this post phenomenally obliging for me, as it contains part of... You have a customary point here! I have bookmarked it and I am imagining looking at new articles.

 

Get Tech Expert
Daily Business Guide
Best Bussiness Circle
It Business mind
Top Online General
Pure Home Improvement
The General Info