Reply
Contributor
Posts: 24
Registered: ‎11-30-2018

Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu

Any updae on this would be of great help. 

Contributor
Posts: 24
Registered: ‎11-30-2018

Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu

Finally my senior spent a week of time and got it resolved for me :( .

 

New version: 1.9.7 Does not work. [Added more fields to OrderType]

Old Version: 1.9.6 Does work.  [Existing fields were very few]

 

The problem could be rooted in the way how Authorize.net upgraded their version.

 

Authorize.Net might have broken existing API. 

 

For now, we are building our project with an older version of Authorize.Net and releasing to the client. 

CC: @Anurag <Please confirm if our investigation is correct or if we are missing something>

Member
Posts: 3
Registered: ‎01-22-2019

Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu

We are having the same exact issue.  We were also using v1.9.7 of the Authorize.Net nuget package and had to roll back to v1.9.6 to get around it.  If we called without setting the order with the orderType the transaction would go through.   When we added that it fails.  The message in the Authorize.Net iframe just says an "unexpected error has occured" in red at the bottom.  We are currently switching over from SIM to Accept.  Something must have broken this in v1.9.7, hopefully a fix is coming.   See our code snippet below.  If we didn't set the order on the transactionRequest it worked.  When we did it broke as described above and in this post.

 

//address information
var billAddress = new customerAddressType
{
firstName = currentBillingRecord.BillingFirstName,
lastName = currentBillingRecord.BillingLastName,
address = currentBillingRecord.BillingAddress.StreetAddress1,
city = currentBillingRecord.BillingAddress.City,
state = currentBillingRecord.BillingAddress.StateProvinceCode,
zip = currentBillingRecord.BillingAddress.PostalCode,
phoneNumber = phoneNumber
};

var order = new orderType
{
invoiceNumber = orderNumber,
};

var transactionRequest = new transactionRequestType
{
transactionType = transactionTypeEnum.authOnlyTransaction.ToString(), // authorize only
amount = amount,
billTo = billAddress,
order = order
};

 

Regards,
TC

 

Member
Posts: 1
Registered: ‎03-02-2019

Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu

Same issue here. 

I am converting from SIM to Accept Hosted. 

Downloaded SKD November 2018 release - 1.9.7. And was receiving "Unexpected Error" message when charging credit card. I was getting the token without any issues from getHostedPaymentPageRequest request.  But was never able to charge the credit card. 

I was able to narrow it down to orderType object, which is very important because it contains invoice number and transaction description; so, I could not afford not to pass it.

Thanks to this thread (specifically to mvkotekar1983 user), the problem was identified to the extra properties that orderType has in 1.9.7 release, which are not supported by API.

I modified 1.9.7 and recompiled and my Accept Hosted page works! I am not done with the migration. I will report back if there is anything that I needed to modify.

 

What I did, I modified orderType class implementation in 1.9.7 SDK and commented out the extra fields. orderType class is located in Api/Contracts/V1/AnetApiSchema.generated.cs file. I commented out everything except:

 

public string invoiceNumber;
public string description;
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;

protected void RaisePropertyChanged(string propertyName) {

            System.ComponentModel.PropertyChangedEventHandler propertyChanged =this.PropertyChanged;

            if ((propertyChanged != null)) {

                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));

            }

        }

I also had to modify public static void orderType(orderType argument) method in requestFactoryWithSpecified.cs file. Just comment out everything in this method.

I then recompiled. And my Accept Hosted page worked!

 

Member
Posts: 3
Registered: ‎01-22-2019

Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu

Disappointed that they put out another update that still seems to have the same issue.  Tested with version 2.0.0 published Saturday, March 2, 2019 and it still has the same issues so we have to stick with version v1.9.6 still.