cancel
Showing results for 
Search instead for 
Did you mean: 

How to redirect to Hosted Payment Page?

Hi ,

 

I need use a Hosted form to accept payment.

Now I get a token from 'getHostedPaymentPageResponse', but how to use this to redirect page to

"https://test.authorize.net/payment/payment"?

It always says 'Missing or invalied token'.

I am using asp.net (C#.net).

Thanks.

suchenming
Member
3 REPLIES 3

Hi @suchenming,

You need to submit your token in the form, with method="POST". Below is an example:

 

<html>
<head><title>Hosted Form</title></head>
<body>
<form method="POST" action="https://test.authorize.net/payment/payment">
<input type="hidden" name ="token" value="Insert Your Token Here" />
<input type="submit" value="Submit Me!"/>
</form>
</body>
</html>

 

Also, please refer to the following documentation:

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

 

PS: The form's action url currently points to Sandbox.

AforANET
Authorize.Net Expert Authorize.Net Expert
Authorize.Net Expert

I'm doing exactly the same thing, but still getting "Missing or invalid token". Why? Help needed, please.

I'm doing exactly the same thing, but still getting an error "Missing or invalid token". Why? Please, help needed.