<?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 Re: What is HTML for passing individual item detail to Square? in Online Store</title>
    <link>https://community.squareup.com/t5/Online-Store/What-is-HTML-for-passing-individual-item-detail-to-Square/m-p/697693#M8653</link>
    <description>&lt;P&gt;I looked at the API documentation which lead me to Github.&amp;nbsp; I am a PHP user and found checkout.php as a possible solution. (&lt;A href="https://github.com/square/connect-api-examples/blob/master/connect-examples/v2/php_checkout/checkout.php" target="_blank"&gt;https://github.com/square/connect-api-examples/blob/master/connect-examples/v2/php_checkout/checkout.php&lt;/A&gt;)&amp;nbsp; Since the checkout will be generated by the back end instead of the client, it looks very promising.&amp;nbsp; I have not tried it yet.&amp;nbsp; In the code it says:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Note this line needs to change if you don't use Composer:&lt;BR /&gt;// require('square-php-sdk/autoload.php');&lt;BR /&gt;require 'vendor/autoload.php';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;use Dotenv\Dotenv;&lt;BR /&gt;use Square\Models\CreateOrderRequest;&lt;BR /&gt;use Square\Models\CreateCheckoutRequest;&lt;BR /&gt;use Square\Models\Order;&lt;BR /&gt;use Square\Models\OrderLineItem;&lt;BR /&gt;use Square\Models\Money;&lt;BR /&gt;use Square\Exceptions\ApiException;&lt;BR /&gt;use Square\SquareClient;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The autoload.php file is critical to making this work because I guess it creates several functions necessary to interface with the Square API.&amp;nbsp; In the PHP quick start guide:&amp;nbsp; &lt;A href="https://developer.squareup.com/docs/sdks/php/quick-start," target="_blank"&gt;https://developer.squareup.com/docs/sdks/php/quick-start,&lt;/A&gt;&amp;nbsp;there is a link to composer:&amp;nbsp;&amp;nbsp;&lt;A href="https://getcomposer.org/" target="_blank"&gt;https://getcomposer.org/&lt;/A&gt;.&amp;nbsp; From there autoload.php can be downloaded.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Back to the code in checkout.php...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$create_order_request = new CreateOrderRequest();&lt;BR /&gt;$create_order_request-&amp;gt;setOrder($order);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That code is the magic that makes it work.&amp;nbsp; The very simple example takes 2 items (A &amp;amp; B) and creates $order.&amp;nbsp; My plan is to query my shopping cart database for the customer's order and output the results into an array ($order[]).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's my plan among other things.&amp;nbsp; Hope it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Dec 2023 16:35:08 GMT</pubDate>
    <dc:creator>UniDaisy</dc:creator>
    <dc:date>2023-12-05T16:35:08Z</dc:date>
    <item>
      <title>What is HTML for passing individual item detail to Square?</title>
      <link>https://community.squareup.com/t5/Online-Store/What-is-HTML-for-passing-individual-item-detail-to-Square/m-p/697486#M8650</link>
      <description>&lt;P&gt;I have my own webserver with an online store.&amp;nbsp; Square has buy it now buttons which are good for a single purchase.&amp;nbsp; But, what if a buyer wants to buy multiple items?&amp;nbsp; In PayPal, one would create a form with the contents of the shopping cart.&amp;nbsp; The PayPay example of unencrypted HTML code looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;form&lt;/SPAN&gt; &lt;SPAN class=""&gt;action&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"&lt;A href="https://www.paypal.com/cgi-bin/webscr" target="_blank" rel="noopener"&gt;hxxpx://xxx!paypal!com/cgi-bin/webscr&lt;/A&gt;"&lt;/SPAN&gt; &lt;SPAN class=""&gt;method&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"post"&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;input&lt;/SPAN&gt; &lt;SPAN class=""&gt;type&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"hidden"&lt;/SPAN&gt; &lt;SPAN class=""&gt;name&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"cmd"&lt;/SPAN&gt; &lt;SPAN class=""&gt;value&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"_cart"&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;input&lt;/SPAN&gt; &lt;SPAN class=""&gt;type&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"hidden"&lt;/SPAN&gt; &lt;SPAN class=""&gt;name&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"upload"&lt;/SPAN&gt; &lt;SPAN class=""&gt;value&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"1"&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;input&lt;/SPAN&gt; &lt;SPAN class=""&gt;type&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"hidden"&lt;/SPAN&gt; &lt;SPAN class=""&gt;name&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"business"&lt;/SPAN&gt; &lt;SPAN class=""&gt;value&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"seller@dezignerfotos.com"&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;input&lt;/SPAN&gt; &lt;SPAN class=""&gt;type&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"hidden"&lt;/SPAN&gt; &lt;SPAN class=""&gt;name&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"item_name_1"&lt;/SPAN&gt; &lt;SPAN class=""&gt;value&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"Item Name 1"&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;input&lt;/SPAN&gt; &lt;SPAN class=""&gt;type&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"hidden"&lt;/SPAN&gt; &lt;SPAN class=""&gt;name&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"amount_1"&lt;/SPAN&gt; &lt;SPAN class=""&gt;value&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"1.00"&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;input&lt;/SPAN&gt; &lt;SPAN class=""&gt;type&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"hidden"&lt;/SPAN&gt; &lt;SPAN class=""&gt;name&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"shipping_1"&lt;/SPAN&gt; &lt;SPAN class=""&gt;value&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"1.75"&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;input&lt;/SPAN&gt; &lt;SPAN class=""&gt;type&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"hidden"&lt;/SPAN&gt; &lt;SPAN class=""&gt;name&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"item_name_2"&lt;/SPAN&gt; &lt;SPAN class=""&gt;value&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"Item Name 2"&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;input&lt;/SPAN&gt; &lt;SPAN class=""&gt;type&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"hidden"&lt;/SPAN&gt; &lt;SPAN class=""&gt;name&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"amount_2"&lt;/SPAN&gt; &lt;SPAN class=""&gt;value&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"2.00"&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;input&lt;/SPAN&gt; &lt;SPAN class=""&gt;type&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"hidden"&lt;/SPAN&gt; &lt;SPAN class=""&gt;name&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"shipping_2"&lt;/SPAN&gt; &lt;SPAN class=""&gt;value&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"2.50"&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;input&lt;/SPAN&gt; &lt;SPAN class=""&gt;type&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"submit"&lt;/SPAN&gt; &lt;SPAN class=""&gt;value&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"PayPal"&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;form&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;What is the example in Square?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 18:15:38 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Online-Store/What-is-HTML-for-passing-individual-item-detail-to-Square/m-p/697486#M8650</guid>
      <dc:creator>UniDaisy</dc:creator>
      <dc:date>2023-12-04T18:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: What is HTML for passing individual item detail to Square?</title>
      <link>https://community.squareup.com/t5/Online-Store/What-is-HTML-for-passing-individual-item-detail-to-Square/m-p/697495#M8651</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/642276"&gt;@UniDaisy&lt;/a&gt;. &amp;nbsp;Square has API/Developer documentation that probably answers your questions. &amp;nbsp;&lt;A href="https://squareup.com/help/us/en/topic/276" target="_self"&gt;Here is the link to the Square API&lt;/A&gt;, which seems like the best starting point. &amp;nbsp;Hopefully that helps.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 18:37:44 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Online-Store/What-is-HTML-for-passing-individual-item-detail-to-Square/m-p/697495#M8651</guid>
      <dc:creator>TheRealChipA</dc:creator>
      <dc:date>2023-12-04T18:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: What is HTML for passing individual item detail to Square?</title>
      <link>https://community.squareup.com/t5/Online-Store/What-is-HTML-for-passing-individual-item-detail-to-Square/m-p/697498#M8652</link>
      <description>&lt;P&gt;&lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/642276"&gt;@UniDaisy&lt;/a&gt;&amp;nbsp;Here’s &lt;A href="https://developer.squareup.com/us/en" target="_self"&gt;another link&lt;/A&gt; to the Square Developer Platform.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 18:42:44 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Online-Store/What-is-HTML-for-passing-individual-item-detail-to-Square/m-p/697498#M8652</guid>
      <dc:creator>TheRealChipA</dc:creator>
      <dc:date>2023-12-04T18:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: What is HTML for passing individual item detail to Square?</title>
      <link>https://community.squareup.com/t5/Online-Store/What-is-HTML-for-passing-individual-item-detail-to-Square/m-p/697693#M8653</link>
      <description>&lt;P&gt;I looked at the API documentation which lead me to Github.&amp;nbsp; I am a PHP user and found checkout.php as a possible solution. (&lt;A href="https://github.com/square/connect-api-examples/blob/master/connect-examples/v2/php_checkout/checkout.php" target="_blank"&gt;https://github.com/square/connect-api-examples/blob/master/connect-examples/v2/php_checkout/checkout.php&lt;/A&gt;)&amp;nbsp; Since the checkout will be generated by the back end instead of the client, it looks very promising.&amp;nbsp; I have not tried it yet.&amp;nbsp; In the code it says:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Note this line needs to change if you don't use Composer:&lt;BR /&gt;// require('square-php-sdk/autoload.php');&lt;BR /&gt;require 'vendor/autoload.php';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;use Dotenv\Dotenv;&lt;BR /&gt;use Square\Models\CreateOrderRequest;&lt;BR /&gt;use Square\Models\CreateCheckoutRequest;&lt;BR /&gt;use Square\Models\Order;&lt;BR /&gt;use Square\Models\OrderLineItem;&lt;BR /&gt;use Square\Models\Money;&lt;BR /&gt;use Square\Exceptions\ApiException;&lt;BR /&gt;use Square\SquareClient;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The autoload.php file is critical to making this work because I guess it creates several functions necessary to interface with the Square API.&amp;nbsp; In the PHP quick start guide:&amp;nbsp; &lt;A href="https://developer.squareup.com/docs/sdks/php/quick-start," target="_blank"&gt;https://developer.squareup.com/docs/sdks/php/quick-start,&lt;/A&gt;&amp;nbsp;there is a link to composer:&amp;nbsp;&amp;nbsp;&lt;A href="https://getcomposer.org/" target="_blank"&gt;https://getcomposer.org/&lt;/A&gt;.&amp;nbsp; From there autoload.php can be downloaded.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Back to the code in checkout.php...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$create_order_request = new CreateOrderRequest();&lt;BR /&gt;$create_order_request-&amp;gt;setOrder($order);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That code is the magic that makes it work.&amp;nbsp; The very simple example takes 2 items (A &amp;amp; B) and creates $order.&amp;nbsp; My plan is to query my shopping cart database for the customer's order and output the results into an array ($order[]).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's my plan among other things.&amp;nbsp; Hope it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 16:35:08 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Online-Store/What-is-HTML-for-passing-individual-item-detail-to-Square/m-p/697693#M8653</guid>
      <dc:creator>UniDaisy</dc:creator>
      <dc:date>2023-12-05T16:35:08Z</dc:date>
    </item>
  </channel>
</rss>

