<?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 Ampersand in return or cancel URLs for GetHostedPaymentPageRequest in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Ampersand-in-return-or-cancel-URLs-for/m-p/64617#M38465</link>
    <description>&lt;P&gt;We have a need to&amp;nbsp;get two data items back as part of the responses to our redirects to an Accept hosted payment page:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) we need our local reference ID to be on the response, and I've read here that putting it in the URL is the way to do so&lt;/P&gt;&lt;P&gt;2) we also need to use the same URL for both return and cancel, so the thought was to include the action type as a GET parameter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;E.g., the Return URL might be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://oursite.com/ProcessPayment?a=return&amp;amp;id=123456" target="_blank"&gt;https://oursite.com/ProcessPayment?a=return&amp;amp;id=123456&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the Cancel URL might be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://oursite.com/ProcessPayment?a=cancel&amp;amp;id=123456" target="_blank"&gt;https://oursite.com/ProcessPayment?a=cancel&amp;amp;id=123456&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when we try sending this through the AuthorizeNet API, the XMLTextWriter in use therein translates the ampersand character to &amp;amp;amp; instead.&amp;nbsp; Which might be fine from the standpoint of valid XML, but it appears that the Authorize.net server cannot&amp;nbsp;convert this back to an ampersand, because even though we get back a success state and a token from GetHostedPaymentPageRequest, when we actually attempt to display the Accept Hosted page using the resulting token,&amp;nbsp;the page&amp;nbsp;is&amp;nbsp;completely messed up (containing only a single line of text and two unlabeled buttons).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please do&amp;nbsp;some or all of the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) suggest a code change or different approach that would allow us to get&amp;nbsp;both of these data items back after a payment redirect, but without the problematic ampersand?&amp;nbsp; (Note that simply using different URLs is an option we would resist pursuing, as we have other systems that are locked into using&amp;nbsp;the same, single URL, and we don't want to start maintaining parallel codebases, especially since that part of our code is supposed to&amp;nbsp;remain agnostic regarding the provider.)&lt;/P&gt;&lt;P&gt;2) suggest a code change to&amp;nbsp;your client API that would allow both data items to be part of the same URL in a way that your server can handle?&lt;/P&gt;&lt;P&gt;3) look into whether something on the Auth.net server side might be broken with respect to handling ampersands in return URLs?&lt;/P&gt;</description>
    <pubDate>Wed, 26 Sep 2018 19:26:52 GMT</pubDate>
    <dc:creator>dsandberg</dc:creator>
    <dc:date>2018-09-26T19:26:52Z</dc:date>
    <item>
      <title>Ampersand in return or cancel URLs for GetHostedPaymentPageRequest</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Ampersand-in-return-or-cancel-URLs-for/m-p/64617#M38465</link>
      <description>&lt;P&gt;We have a need to&amp;nbsp;get two data items back as part of the responses to our redirects to an Accept hosted payment page:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) we need our local reference ID to be on the response, and I've read here that putting it in the URL is the way to do so&lt;/P&gt;&lt;P&gt;2) we also need to use the same URL for both return and cancel, so the thought was to include the action type as a GET parameter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;E.g., the Return URL might be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://oursite.com/ProcessPayment?a=return&amp;amp;id=123456" target="_blank"&gt;https://oursite.com/ProcessPayment?a=return&amp;amp;id=123456&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the Cancel URL might be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://oursite.com/ProcessPayment?a=cancel&amp;amp;id=123456" target="_blank"&gt;https://oursite.com/ProcessPayment?a=cancel&amp;amp;id=123456&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when we try sending this through the AuthorizeNet API, the XMLTextWriter in use therein translates the ampersand character to &amp;amp;amp; instead.&amp;nbsp; Which might be fine from the standpoint of valid XML, but it appears that the Authorize.net server cannot&amp;nbsp;convert this back to an ampersand, because even though we get back a success state and a token from GetHostedPaymentPageRequest, when we actually attempt to display the Accept Hosted page using the resulting token,&amp;nbsp;the page&amp;nbsp;is&amp;nbsp;completely messed up (containing only a single line of text and two unlabeled buttons).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please do&amp;nbsp;some or all of the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) suggest a code change or different approach that would allow us to get&amp;nbsp;both of these data items back after a payment redirect, but without the problematic ampersand?&amp;nbsp; (Note that simply using different URLs is an option we would resist pursuing, as we have other systems that are locked into using&amp;nbsp;the same, single URL, and we don't want to start maintaining parallel codebases, especially since that part of our code is supposed to&amp;nbsp;remain agnostic regarding the provider.)&lt;/P&gt;&lt;P&gt;2) suggest a code change to&amp;nbsp;your client API that would allow both data items to be part of the same URL in a way that your server can handle?&lt;/P&gt;&lt;P&gt;3) look into whether something on the Auth.net server side might be broken with respect to handling ampersands in return URLs?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 19:26:52 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Ampersand-in-return-or-cancel-URLs-for/m-p/64617#M38465</guid>
      <dc:creator>dsandberg</dc:creator>
      <dc:date>2018-09-26T19:26:52Z</dc:date>
    </item>
  </channel>
</rss>

