[New Plugin] Square Checkout - By Interwebb

Hi, we’re getting the same property of url undefined error and the logs are revealing this:

INFO response = {"errors":[{"category":"INVALID_REQUEST_ERROR","code":"EXPECTED_INTEGER","detail":"Expected an integer value.","field":"order.line_items[2].base_price_money.amount"}]} END 

It’s hard to figure out exactly which field is causing problems since there isn’t anything in the workflow called “base price money” but even more importantly, why doesn’t the plugin notify us on the workflow itself if the format is incorrect?

Trying to fix by throwing formatting at things:
image

Hi @brenton.strine, I’ve sent you a private message so we can get this fixed for you.

1 Like

Thanks @Phill.NullaCode . The problem field was Item Price and multiplying our USD by 100, formatting with 0 decimals, and then converting to number fixed it.

That field does have some error checking… for example if you try to pass it an element, it sees the problem:
image

However if you pass it a number with decimals, it doesn’t complain (though it should!).
image

Even if the error catching can’t be improved, the documentation tip could at least be made more clear that a non-integer will cause an error.

2 Likes

Glad you got it sorted!

Luckily, as you have described, Bubble automatically highlights in red when the value is the incorrect type (evaluates to text when it should be a number for example) this should also show as an error in your app to help with troubleshooting next time :slight_smile:

If you have any issues with the plugin please let us know!

Thanks,

Phill

Thanks I’ll give it a go shortly and report back

1 Like

Yes, it should, but to be clear: it doesn’t.

Hi All,

I’m excited to announce that we have released a new plugin - Square Subscriptions! Please see the forum post for more info.

Along with the new plugin comes a new Square Checkout action, Create Subscription Payment Link. You can use this action to get a customer to start paying for a subscription using the Square-hosted checkout directly from your app and even override the pre-defined price.

Thanks,

Phill

Hi, does this work with Cash App Pay. It allows users to pay with their Cash App balance and is current only available for US based users. https://developer.squareup.com/blog/announcing-cash-app-pay-for-developers/

1 Like

Hi @rgnldbrks, yes, the Checkout plugin has an option to allow customers to use Cash App pay.

Please let us know how you get on using it!

Phill

1 Like

I just purchased this plugin and trying to get it setup. I must be missing a major step because I’m getting these errors.

START RequestId: d8b263f0-176e-42d2-bd43-1d6a87c04b33 Version: $LATEST 2022-06-24T00:22:44.619Z d8b263f0-176e-42d2-bd43-1d6a87c04b33 INFO prop access token 2022-06-24T00:22:45.122Z d8b263f0-176e-42d2-bd43-1d6a87c04b33 INFO { url: ‘https://connect.squareupsandbox.com/v2/online-checkout/payment-links’, method: ‘POST’, headers: { Accept: ‘application/json’, Authorization: ‘Bearer null’ }, body: ‘{“checkout_options”:{“accepted_payment_methods”:{“google_pay”:false,“apple_pay”:false,“afterpay_clearpay”:false,“cash_app_pay”:true},“allow_tipping":false,“ask_for_shipping_address”:false,“merchant_support_email”:"ride@hytchhyke.com”,“redirect_url”:“https://hytchhykeapp.bubbleapps.io/version-test"},“quick_pay”:{“price_money”:{“amount”:10,“currency”:“USD”},“name”:"Hytch Hyke”,“location_id”:“sandbox-sq0idb-hlTxsb3XA-1xHNeJzQOzvg”}}’ } 2022-06-24T00:22:45.122Z d8b263f0-176e-42d2-bd43-1d6a87c04b33 INFO { “errors”: [ { “category”: “AUTHENTICATION_ERROR”, “code”: “UNAUTHORIZED”, “detail”: “This request could not be authorized.” } ] } 2022-06-24T00:22:45.122Z d8b263f0-176e-42d2-bd43-1d6a87c04b33 INFO undefined 2022-06-24T00:22:45.122Z d8b263f0-176e-42d2-bd43-1d6a87c04b33 INFO { url: ‘https://connect.squareupsandbox.com/v2/online-checkout/payment-links’, method: ‘POST’, headers: { Accept: ‘application/json’, Authorization: ‘Bearer null’ }, body: ‘{“checkout_options”:{“accepted_payment_methods”:{“google_pay”:false,“apple_pay”:false,“afterpay_clearpay”:false,“cash_app_pay”:true},“allow_tipping":false,“ask_for_shipping_address”:false,“merchant_support_email”:"ride@hytchhyke.com”,“redirect_url”:“https://hytchhykeapp.bubbleapps.io/version-test"},“quick_pay”:{“price_money”:{“amount”:10,“currency”:“USD”},“name”:"Hytch Hyke”,“location_id”:“sandbox-sq0idb-hlTxsb3XA-1xHNeJzQOzvg”}}’ } END RequestId: d8b263f0-176e-42d2-bd43-1d6a87c04b33 REPORT RequestId: d8b263f0-176e-42d2-bd43-1d6a87c04b33 Duration: 575.78 ms Billed Duration: 576 ms Memory Size: 128 MB Max Memory Used: 74 MB Init Duration: 356.49 ms

Plugin server side action console error

TypeError: Cannot read property ‘url’ of undefined at eval (eval at build_function (/var/task/index.js:86:21), :68:53) at /var/task/index.js:349:23 at run_fn (/var/task/u.js:594:18)

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

Hi @rgnldbrks , thanks for the purchase! Looks like it doesn’t have an Access Token. Have you added it to the plugin page in your app?

Thanks,

Phill

Hi All, a couple of updates…

We’ve released a free version of this Square Checkout plugin so that you can easily try out the basic Create Quick Payment Link feature. Future updates and additional functionality including Google/Apple pay, tiping, taxes, service charges, subscriptions and orders will continue to only be available on the paid version of the Square Checkout plugin.

In addition, we’re considering releasing a Square Plugin Bundle plugin that includes all of our current and future premium Square plugin actions within one plugin and at a massively discounted price (50% off?). Please let us know if this will be of interest to you.

Thanks,

Phill

2 Likes

Hi @taylor1 ,

If you’re still interested, please see our new plugin [New Plugin] Square Web Payments SDK & Cards - By Interwebb - Showcase / Plugins - Bubble Forum

Thanks,

Phill

1 Like

Yes, wrapping up another project right now… but this is next on my list :slight_smile:

1 Like

Hi @chris.anderson,

As per your observations in your post on the other thread, I’ve fixed an issue and now the Order Id should be a returned value in all of the Create Payment Link actions.

Please update to the latest version 2.8.0.

Thanks,

Phill

1 Like

Works like a charm, thanks @Phill.NullaCode! I’ve now got webhooks coming back from Square, matching on Order ID and updating the transaction status in my DB. Thanks for the quick turnaround!

No problem at all :slight_smile: hopefully you can get Square working how you need for your app!

Thanks,

Phill

1 Like

Hi Everyone,

You may notice a new version of this plugin has been released, nothing major, we’ve changed the plugin’s name slightly to Square Online Checkout, edited the description and added a new animated logo :slight_smile:

Thanks,

Phill

Hi @zach8, I’m continuing our conversation here as my reply is related to the Square Online Checkout plugin.

I’ve tested processing a payment using the Create Order Payment Link action using a Catalog/Inventory item in the Line Items List. I can confirm that this did reduce the item’s stock in my test account.

Feel free to reach out to Square Support or check their documentation if you’d like to understand how their APIs work. Our Square plugins are available to help make it easy for you to integrate your Bubble app with the Square APIs.

I hope this helps :slight_smile:

Phill

*(moved the conversation here, didn’t realize I was replying in the web payments form thread)

Hey Phill, thanks for the tip. I have not used the logs before, but this will be useful in future troubleshooting of all sorts. Here is the error that was produced (image of the full log entry below):

{“errors”:[{“category”:“INVALID_REQUEST_ERROR”,“code”:“NOT_FOUND”,“detail”:“Item variation with catalog object ID ZZPS5OQCHMFNPBG3IK7NZVV2, 63BDRR76WVKGUIS2Q3KZQVMG not found.”}]} END

The logs show an error with the plugin’s handoff. The list of Catalog Item IDs is not being passed as a list of IDs. Instead it is passing the the string of IDs as a single ID. My screenshot in the previous post shows the operators and comparisons I used to pass the list to the plugin. Did I mis-state something?

Thanks!

1 Like