Forum Academy Marketplace Showcase Pricing Features

[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 @Interwebb . 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.

1 Like

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/

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”:"[email protected]”,“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”:"[email protected]”,“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