Forum Academy Marketplace Showcase Pricing Features

[New Plugin] Square Checkout - By Interwebb

Hi @zach8 thanks for moving the post over from the other thread :slight_smile:

If you only add 1 Catalog Id per line item object, this should fix your issue, for example, change ‘ZZPS5OQCHMFNPBG3IK7NZVV2, 63BDRR76WVKGUIS2Q3KZQVMG’ to only ‘ZZPS5OQCHMFNPBG3IK7NZVV2

and then a separate line item object will need to be created using the Create Catalog Line Item workflow action for ‘63BDRR76WVKGUIS2Q3KZQVMG’.

Here is the documentation, let me know if this solves your issue or if you need further assistance.

Thanks,

Phill

Hi Phill,

This seems to be contradictory to the documentation. The documentation suggests I can pass a list of text-based line items. Are you saying I can pass a list of text-based items, but I can’t pass a list of Product IDs?

Thanks.

Hi @zach8 , i’ll have a look at updating the documentation as I can understand if it’s not as clear as I’d hoped.

When you use the Create Catalog Line Item workflow action, it creates some text (a Line Item Object) used in the Create Order Payment Link workflow action to create the Square Order Checkout.

Line Item Object example:{"catalog_object_id":"RG5NSHJCVJKUP7AAIQ5LJP53","quantity":"2"}

Each Line Item Object is 1 product (using 1 Catalog ID) and its quantity in the checkout. For example, 1 line item could be: 3 x Pizza.

To add multiple line items to the checkout you need to use the Create Catalog Line Item workflow action to generate the Line Item Object for each product. You can then add these Line Item Objects to a List of texts in your app and add this list into the Create Order Payment Link workflow action’s Line Item’s List field.

For example, you would use the Create Catalog Line Item 3 times (once for each product) to generate your checkout line items as follows:

3 x Pizza
4 x T-Shirt
7 x Shoes

Here is the text list we use in our example:

image
image
image
image

In our example checkout, when you add an item to the basket it uses the Create Catalog Line Item workflow action and adds this to the BasketList as a new item in the list.

I hope this makes a bit more sense!

Thanks,

Phill

Hey @Phill.Interwebb thanks for your previous reply. I haven’t had an opportunity to work on it yet.

But I’m working on a site for a friend, I’m trying to implement the Square checkout, and I’m getting the following error trying to generate a payment link from a single catalog id:

Plugin action Square Checkout V2 - Create Order Payment Link error:
TypeError: Cannot read property ‘url’ of undefined
at eval (eval at build_function (/var/task/index.js:86:21), :101:53)
at /var/task/index.js:349:23
at run_fn (/var/task/u.js:594:18)

I checked the logs and that error is repeated in the logs.

Hi @zach8,

Thats great that you’re helping your friend with their site, thanks for chosing to use our plugin.

Try checking the plugin specific server logs and it shoupd have a more detailed error description.

Go to:

Bubble.io editor > Logs > Server Logs > Show Advanced > Select the Plugin Options Below > Search

Let me know if this helps solve your problem, if not please share the logs and we’ll do our best to help.

Thanks,

Phill

Hi Phill,

When I shared the image from my server logs earlier it was with the above parameters selected. I just went back and double-checked, and the error is indeed the same. Here is the log with the preceding step where the plugin successfully creates the order, and it seems to create the payment link. It seems like something goes wrong when Bubble tries to use the link in the workflow. Granted I have no idea really.

@Phill.Interwebb FWIW, I’m now having the same issue on my site. The quick payment link was working before, but now when I try to use it, it produces the same error that I was seeing on the other site.

Thanks for your help.

Hi @zach8 apologies for the slow response, I cannot see the plugin server side action output in your screenshot. If you share this error i’ll be able to help.

Could you also please let me know which API version you are using in the Square Developer Dashboard?

Thanks,

Phill

SALE!

For the rest of the month, the Square Online Checkout will be 50% off!

Check it out here.

Thanks!

Phill

One more day of our 50% off sale left!

We are also working on lots of new plugin features and improvements.

Thanks,

Phill