-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected error when using hosted payment page orderType #11
Comments
Hey, how did you solve it? |
I modified the AuthorizeNet code to remove the fields causing the problem. Take a look here: mccinnovations@047463a |
Can you please provide me with a sample? something with createcustormerprofile AuthorizeNet.Api.Controllers.Bases.ApiOperationBase`2' threw an exception. |
This problem still exist. (01 Mar 2022) Here is what my orderType object looks like and the transactionRequestType that uses it:
...
|
This appears to still be broken months later in version 2.0.3. Switching to AuthorizeNet.Fork.Aspcore2 v1.9.3 fixes the problem, as previously mentioned, but is there a plan to resolve this issue with the official package? |
We already found the solution. |
When I use the Hosted Payment Page API integration and attempt to make a payment the form gives an error: "Unexpected error. Please try again".
Steps to reproduce:
Observed result:
The form will show an error message in red text, "Unexpected error. Please try again".
The response from Authorize.Net is:
Notes:
I had previously been using the dotnet sdk and did not experience this problem in version 1.9.6 or 1.9.7 (https://github.com/AuthorizeNet/sdk-dotnet). I did not change any code but switched to the dotnet core sdk DLL (https://github.com/AuthorizeNet/dotnet-core-sdk-beta/blob/master/ReleaseArtifact/AuthorizeNET.dll) and started seeing the problem.
If you inspect the requests being sent by the dotnet core sdk you'll see it has extra fields as part of the order information. It was sending discountAmount and purchaseOrderDateUTC with default values in addition to the invoiceNumber and description fields. I can only assume this causes a problem in Authorize.Net’s system because those fields are not part of the API (https://developer.authorize.net/api/reference/#accept-suite-get-an-accept-payment-page).
The decompiled orderType class definition in the dotnet core sdk has many fields that do not exist in the dotnet sdk. And the new discountAmount and purchaseOrderDateUTC fields are not nullable so they get sent along with default values. I downloaded the dotnet core sdk code from github, removed the extra fields in the orderType class and rebuilt the code. When I used that DLL I was able to complete a payment without any problems.
This is a blocking problem preventing us from using the dotnet core sdk. Can we get an idea of when this will be resolved? Also the sdk is still in beta, but the code repository has modifications in it from 2 years ago. Is there a reason it is still in beta, and when can we expect it will be available for use in production?
The text was updated successfully, but these errors were encountered: