<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cannot Redirect to Accept Hosted URL in cybersource APIs</title>
    <link>https://community.developer.cybersource.com/t5/cybersource-APIs/Cannot-Redirect-to-Accept-Hosted-URL/m-p/90007#M1697</link>
    <description>&lt;P&gt;It will no longer let me edit the original post, but I've figured out one problem, but now have another. When I removed the last `/` from `.../payment/payment/` to `.../payment/payment`, it seems to work a bit better. No more 505s, but I'm getting this:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="timeout.png" style="width: 583px;"&gt;&lt;img src="https://community.developer.cybersource.com/t5/image/serverpage/image-id/2561i20CE2FF634F37C1E/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="timeout.png" alt="timeout.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 24 Aug 2024 18:49:39 GMT</pubDate>
    <dc:creator>davidlbowman</dc:creator>
    <dc:date>2024-08-24T18:49:39Z</dc:date>
    <item>
      <title>Cannot Redirect to Accept Hosted URL</title>
      <link>https://community.developer.cybersource.com/t5/cybersource-APIs/Cannot-Redirect-to-Accept-Hosted-URL/m-p/90004#M1696</link>
      <description>&lt;P&gt;Thank you for your help.&lt;BR /&gt;&lt;BR /&gt;I'm building a project in TypeScript, React, and Next.js.&amp;nbsp; Please excuse some bad practices as I'm currently trying to get the initial integration working.&lt;/P&gt;&lt;P&gt;I have a `/lib/authorizeNet.ts` file with a `getHostedPaymentPageRequest()` function. This function successfully (200) returns a token, which is a very long string.&lt;BR /&gt;&lt;BR /&gt;I have a `/test.ts` file with a sample `transactionRequest` and `HostedPaymentSettings`. At the bottom of the file, I call `getHostedPaymentPageRequest(transactionRequest, hostedPaymentSettings)` and it successfully returns the token.&lt;BR /&gt;&lt;BR /&gt;Finally, I have a `/app/payment/page.tsx,` it's as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import { testGetHostedPaymentPageRequest } from "@/lib/test"

export default async function Payment() {
	const token = await testGetHostedPaymentPageRequest()

	return (
		&amp;lt;&amp;gt;
			{typeof token === "string" ? (
				&amp;lt;form
					method="post"
					action="https://test.authorize.net/payment/payment/"
					id="formAuthorizeNetTestPage"
					name="formAuthorizeNetTestPage"
				&amp;gt;
					&amp;lt;input type="hidden" name="token" value={token} /&amp;gt;
					&amp;lt;button type="submit"&amp;gt;Continue to Payment&amp;lt;/button&amp;gt;
				&amp;lt;/form&amp;gt;
			) : (
				&amp;lt;h1&amp;gt;Hello World&amp;lt;/h1&amp;gt;
			)}
		&amp;lt;/&amp;gt;
	)
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In short, it gets a token, creates a simple form, and a button, which when clicked should bring you to the correct sandbox URL with the payload for token. It does this successfully, as I can see in the Network tab.&lt;BR /&gt;&lt;BR /&gt;I end up on&amp;nbsp;&lt;A href="https://test.authorize.net/payment/payment/" target="_blank" rel="noopener"&gt;https://test.authorize.net/payment/payment/&lt;/A&gt;&amp;nbsp;with several 505 errors. I don't know if my form code is incorrect because it's not bringing me to /payment/payment/token=${token} or something like this. Could you please tell me how I can resolve this issue?&lt;/P&gt;&lt;P&gt;Here's the network payload.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="payload.png" style="width: 910px;"&gt;&lt;img src="https://community.developer.cybersource.com/t5/image/serverpage/image-id/2560iA873A550998404FD/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="payload.png" alt="payload.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Aug 2024 18:10:16 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/cybersource-APIs/Cannot-Redirect-to-Accept-Hosted-URL/m-p/90004#M1696</guid>
      <dc:creator>davidlbowman</dc:creator>
      <dc:date>2024-08-24T18:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Redirect to Accept Hosted URL</title>
      <link>https://community.developer.cybersource.com/t5/cybersource-APIs/Cannot-Redirect-to-Accept-Hosted-URL/m-p/90007#M1697</link>
      <description>&lt;P&gt;It will no longer let me edit the original post, but I've figured out one problem, but now have another. When I removed the last `/` from `.../payment/payment/` to `.../payment/payment`, it seems to work a bit better. No more 505s, but I'm getting this:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="timeout.png" style="width: 583px;"&gt;&lt;img src="https://community.developer.cybersource.com/t5/image/serverpage/image-id/2561i20CE2FF634F37C1E/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="timeout.png" alt="timeout.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Aug 2024 18:49:39 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/cybersource-APIs/Cannot-Redirect-to-Accept-Hosted-URL/m-p/90007#M1697</guid>
      <dc:creator>davidlbowman</dc:creator>
      <dc:date>2024-08-24T18:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Redirect to Accept Hosted URL</title>
      <link>https://community.developer.cybersource.com/t5/cybersource-APIs/Cannot-Redirect-to-Accept-Hosted-URL/m-p/90008#M1698</link>
      <description>&lt;P&gt;Okay, my issue was I was using the same customer name over again, so the token was dead.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Last question, is it possible to use an iframe on localhost?&lt;/P&gt;</description>
      <pubDate>Sat, 24 Aug 2024 19:20:50 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/cybersource-APIs/Cannot-Redirect-to-Accept-Hosted-URL/m-p/90008#M1698</guid>
      <dc:creator>davidlbowman</dc:creator>
      <dc:date>2024-08-24T19:20:50Z</dc:date>
    </item>
  </channel>
</rss>

