<?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>thread Request not authorized error in Archived Discussions (Read Only)</title>
    <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/ABUSE-By-pandawagon-Board-troubleshooting-28524/m-p/243927#M93034</link>
    <description>&lt;P&gt;Everything works fine for the sandbox, but I am getting a "Request not authorized error" when I switch over to my production credentials.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I set the application id and location id in my js code (please note that my real credentials are obscured by "xxx" below):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;const paymentForm = new SqPaymentForm({&lt;BR /&gt;// Initialize the payment form elements&lt;BR /&gt;applicationId: "xxx",&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used the production access token in my php code:&lt;/P&gt;
&lt;P&gt;$client = new SquareClient([&lt;BR /&gt;'accessToken' =&amp;gt; 'xxx',&lt;BR /&gt;'environment' =&amp;gt; Environment::PRODUCTION&lt;BR /&gt;]);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;$body2-&amp;gt;setLocationId('xxx');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How come the code works for the sandbox environment but doesn't work when I change the environment to production and update my credentials?&lt;/P&gt;</description>
    <pubDate>Fri, 12 Feb 2021 02:30:41 GMT</pubDate>
    <dc:creator>pandawagon</dc:creator>
    <dc:date>2021-02-12T02:30:41Z</dc:date>
    <item>
      <title>[ABUSE] By: pandawagon / Board: troubleshooting (28524)</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/ABUSE-By-pandawagon-Board-troubleshooting-28524/m-p/243982#M93033</link>
      <description>Access &lt;P&gt;&lt;BR /&gt;Link to post:
&lt;A href="https://www.sellercommunity.com/t5/Troubleshooting/Request-not-authorized-error/m-p/243927#M28524" target="_blank"&gt;(Request not authorized error)&lt;/A&gt;&lt;BR /&gt;
 &lt;A href="https://www.sellercommunity.com/t5/user/viewprofilepage/user-id/344436" target="_blank"&gt;pandawagon&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;
&lt;A href="https://www.sellercommunity.com/t5/Troubleshooting/Request-not-authorized-error/m-p/243927#M28524" target="_blank"&gt;https://www.sellercommunity.com/t5/Troubleshooting/Request-not-authorized-error/m-p/243927#M28524&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;
 Everything works fine for the sandbox, but I am getting a "Request not authorized error" when I switch over to my production credentials. &amp;nbsp; I set the application id and location id in my js code (please note that my real credentials are obscured by "xxx" below): &amp;nbsp; const paymentForm = new SqPaymentForm({ // Initialize the payment form elements applicationId: "xxx", &amp;nbsp; I used the production access token in my php code: $client = new SquareClient([ 'accessToken' =&amp;gt; 'xxx', 'environment' =&amp;gt; Environment::PRODUCTION ]); &amp;nbsp; $body2-&amp;gt;setLocationId('xxx'); &amp;nbsp; &amp;nbsp; How come the code works for the sandbox environment but doesn't work when I change the environment to production and update my credentials?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;
&lt;B&gt;This message has 0 replies&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 11:48:53 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/ABUSE-By-pandawagon-Board-troubleshooting-28524/m-p/243982#M93033</guid>
      <dc:creator>tk1swify</dc:creator>
      <dc:date>2021-02-12T11:48:53Z</dc:date>
    </item>
    <item>
      <title>Request not authorized error</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/ABUSE-By-pandawagon-Board-troubleshooting-28524/m-p/243927#M93034</link>
      <description>&lt;P&gt;Everything works fine for the sandbox, but I am getting a "Request not authorized error" when I switch over to my production credentials.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I set the application id and location id in my js code (please note that my real credentials are obscured by "xxx" below):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;const paymentForm = new SqPaymentForm({&lt;BR /&gt;// Initialize the payment form elements&lt;BR /&gt;applicationId: "xxx",&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used the production access token in my php code:&lt;/P&gt;
&lt;P&gt;$client = new SquareClient([&lt;BR /&gt;'accessToken' =&amp;gt; 'xxx',&lt;BR /&gt;'environment' =&amp;gt; Environment::PRODUCTION&lt;BR /&gt;]);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;$body2-&amp;gt;setLocationId('xxx');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How come the code works for the sandbox environment but doesn't work when I change the environment to production and update my credentials?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 02:30:41 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/ABUSE-By-pandawagon-Board-troubleshooting-28524/m-p/243927#M93034</guid>
      <dc:creator>pandawagon</dc:creator>
      <dc:date>2021-02-12T02:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: [ABUSE] By: pandawagon / Board: troubleshooting (28524)</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/ABUSE-By-pandawagon-Board-troubleshooting-28524/m-p/244441#M93035</link>
      <description>&lt;P&gt;Have you tried&amp;nbsp;updating your&amp;nbsp;JS link to switch to production:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Changing this:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;lt;script type="text/javascript" src="&lt;A href="https://js.squareupsandbox.com/v2/paymentform" target="_blank"&gt;https://js.squareupsandbox.com/v2/paymentform&lt;/A&gt;"&amp;gt; &amp;lt;/script&amp;gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;to this:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;lt;script type="text/javascript" src="&lt;A href="https://js.squareup.com/v2/paymentform" target="_blank"&gt;https://js.squareup.com/v2/paymentform&lt;/A&gt;"&amp;gt; &amp;lt;/script&amp;gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/350894"&gt;@tk1swify&lt;/a&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Feb 2021 19:28:19 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/ABUSE-By-pandawagon-Board-troubleshooting-28524/m-p/244441#M93035</guid>
      <dc:creator>JustinC</dc:creator>
      <dc:date>2021-02-13T19:28:19Z</dc:date>
    </item>
  </channel>
</rss>

