Hello Everyone,
I'm currently seeing the "Missing or Invalid Token" when trying to display host form in my iFrame. I've read other posts in this forum regarding the same issue and I've applied the suggestions however, I'm not having any luck. Here are the endpoints and code I'm using:
.NET C# implementation
GetToken URL: Snippet
https://test.authorize.net/payment/payment
GetHostForm URL: Snippet
https://test.authorize.net
I can successfully retrieve a token using the provided C# code.
Here's the HTML I have implemented:
<div>
<input type="hidden" id="Token" name="Token" value="@Model.AcceptPaymentToken" />
<input type="hidden" name="PaymentProfileId" value="" />
<input type="hidden" name="ShippingAddressId" value="" />
<div id="divAuthorizeNetPopup" style="display:none;" class="AuthorizeNetPopupSimpleTheme">
<div class="AuthorizeNetPopupOuter">
<iframe src="/CheckOut/AuthorizePage" name="iframeAuthorizeNet" id="iframeAuthorizeNet" frameborder="0" scrolling="no"></iframe>
</div>
<div class="AuthorizeNetShadow AuthorizeNetShadowT"></div>
<div class="AuthorizeNetShadow AuthorizeNetShadowR"></div>
<div class="AuthorizeNetShadow AuthorizeNetShadowB"></div>
<div class="AuthorizeNetShadow AuthorizeNetShadowL"></div>
<div class="AuthorizeNetShadow AuthorizeNetShadowTR"></div>
<div class="AuthorizeNetShadow AuthorizeNetShadowBR"></div>
<div class="AuthorizeNetShadow AuthorizeNetShadowBL"></div>
<div class="AuthorizeNetShadow AuthorizeNetShadowTL"></div>
</div>
<button onclick="AuthorizeNetPopup.openAddPaymentPopup()">Add a New Payment</button>
<!--
INSTRUCTIONS:
Put this divAuthorizeNetPopupScreen section right before the closing </body> tag.
-->
<div id="divAuthorizeNetPopupScreen" style="display:none;"></div>
</div>
I have tried generating a token through the Authorize.NET GUI and paste into the examplePage.html provided in the examples section but I get the same error message.
I would greatly appreciate your help. This has been bugging me for several days now.