cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Sandbox testing payment error: unexpected error. Please try again.

I use this integration method https://developer.authorize.net/api/reference/features/accept_hosted.html
I use your libraries in c# .net. Call getHostedPaymentPageRequest in sandbox environment and get token. I use my loginid and transactionkey.
Then I redirect to https://test.authorize.net/payment/payment and post token. Then form for credit card is shown and I write testing card. Get error on button pay: unexpected error. Please try again.
What I am doing wrong?

stajnert
Member
2 REPLIES 2

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)
        }
}

 

 

 

UPSers 

Bryant47
Member

Payroll unexpected error wo how we handle it can you explain it.

https://apkact.com 

aqsa1231
Member