Skip to content
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

Hosted payment page error after filling out payment information #99

Open
sstalder opened this issue Mar 5, 2019 · 10 comments
Open

Hosted payment page error after filling out payment information #99

sstalder opened this issue Mar 5, 2019 · 10 comments
Labels

Comments

@sstalder
Copy link

sstalder commented Mar 5, 2019

Steps to reproduce:

  • Run sample for GetAnAcceptPaymentPage
  • Redirect to payment page via the code below
<form action="https://test.authorize.net/payment/payment" method="post">
	<input type="text" name="token" value="token value here" />
	<hr />
	<button type="submit">Pay</button>
</form>
  • Fill out form with test credit card information
Credit Card #: 4111111111111111
Credit Card Exp: 11/21
Credit Card Code: 907

Upon clicking pay you get an error "Unexpected error. Please try again."

I have tried several different ways to generate the token as well as several different types of credit card numbers (all test numbers) and amounts, etc. I cannot get a working sample to go through.

I even tried to do this in a production environment and had the same result. Can someone please let me know what exactly this error is?

You can duplicate the error using the sample codes api login or with any generated one from the sandbox.

@gnongsie
Copy link
Contributor

gnongsie commented Mar 6, 2019

Hi,
Apologies for the inconvenience caused.
There seems to be a bug in the way that DateTime values are handled in the C# SDK.

A fix has been sent and is pending release ( .NET SDK #257 ).

Your code for doing the payment does not have any issues. I believe the issue is from the GetAnAcceptPaymentPage sample, if you are also using the order information in the request.

A temporary workaround for this is to include a valid date for order.purchaseOrderDateUTC in the format "YYYY-mm-dd".

transactionRequest = new transactionRequestType {
        amount = "100.00",
        transactionType = transactionTypeEnum.authCaptureTransaction.ToString(),
        order = new orderType {
            invoiceNumber = invoiceId,
            description = invoiceId,
            purchaseOrderDateUTC = new DateTime(2018, 03, 23, 11, 00, 00, DateTimeKind.Utc)
        }
}

@gnongsie gnongsie added the has-pr Has a Pull Request in place for SDK label Mar 6, 2019
@sstalder
Copy link
Author

sstalder commented Mar 6, 2019

In the .NET SDK the purchaseOrderDateUTC is a DateTime type. How are you putting a string for that value?

Can this fix also be moved to the dotnet core sdk as well?

@sstalder
Copy link
Author

sstalder commented Mar 7, 2019

Unfortunately the workaround proposed doesn't appear to work. The only way I can get it to go through is to not include the "order" object.

@gnongsie
Copy link
Contributor

Hi,
Apologies for the inconvenience. I initially thought this would fix the issue.

In any case, I have escalated this to the relevant team and will update this thread with the progress.

@gnongsie gnongsie added bug and removed has-pr Has a Pull Request in place for SDK labels Apr 5, 2019
@sstalder
Copy link
Author

Hey Gabriel, has there been any update on this issue? Thanks!

@esw0000000
Copy link

esw0000000 commented Aug 21, 2019

Yikes. Five months later and this is still not fixed. For anyone trying to resolve this issue, I was able to get the sample code working by reverting to 1.9.6.

@SeriaWei
Copy link

SeriaWei commented Mar 2, 2020

Is there any plan to fix this issue? I have to return to use 1.9.6 to make it works.

@ahawes-clarity
Copy link

Almost a year later. Any fix for this?

@w7tcp
Copy link

w7tcp commented Mar 3, 2021

Still an issue as of now. Workarounds are either to leave the 'order' undefined, or to revert to dotnet SDK version 1.9.6. On reviewing the API documentation here, it seems like the orderType object has a lot of new fields in version 1.9.7 and later, that don't seem to be defined in the API as of today.

@popisms
Copy link

popisms commented Apr 29, 2024

FIVE YEARS LATER, and this bug still has not been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants