Budibase / budibase

Low code platform for building business apps and workflows in minutes. Supports PostgreSQL, MySQL, MariaDB, MSSQL, MongoDB, Rest API, Docker, K8s, and more 🚀
https://budibase.com
Other
22.47k stars 1.55k forks source link

Stripe Checkout Plugin #7937

Closed rpmcoding closed 2 years ago

rpmcoding commented 2 years ago

It would be amazing if you or someone else is able to create a plugin for Stripe Checkout.

melohagan commented 2 years ago

Here you go! https://github.com/melohagan/budibase-datasource-stripe-checkout

rpmcoding commented 2 years ago

@melohagan fantastic thanks. In what format should we add parameters to the parameters textarea under fields on the plugin page please?

melohagan commented 2 years ago

Hey @rpmcoding

I'm not sure what you mean. Is there a particular CRUD function you are referring to?

rpmcoding commented 2 years ago

@melohagan sorry, yes create.

Am referring to this textarea.

crud

melohagan commented 2 years ago

Thanks, that'll be a JSON object. E.g.

{
 "line_items": [
    {
      "price": "price_H5ggYwtDq4fbrJ", 
      "quantity": 2
    }
  ]
}
melohagan commented 2 years ago

Official docs here: https://stripe.com/docs/api/checkout/sessions/create?lang=node Select Node.js from the dropdown: Screenshot 2022-09-27 at 16 38 38

rpmcoding commented 2 years ago

@melohagan thanks, that works perfectly. Given line_items are the only other required field by the looks of it, perhaps they could be normal text fields in the plugin rather than having to manually input json? Just thinking more and more about no-code.

melohagan commented 2 years ago

Well looking at the docs it's not labelled as required. I think it's only conditionally required, and you may be able to pass other parameters instead. It's also an array of objects, so it'd have to be JSON anyway.

rpmcoding commented 2 years ago

@melohagan It is required unfortunately, removing it gives error:- "Query Error: The line_items parameter is required in payment mode."

I appreciate it is an array of objects, but if this is to be a true no-code platform, the array of objects and json should be generated in the background from the simple text inputs fields.

As general feedback, I love budibase, it is great. The only part that is a limitation is dealing with the data via the JavaScript for the transformer, json and accessing data via data.data[0].something.somethine etc etc.

It all really needs to be point and click to be truly no code.

Please do take this is genuine constructive feedback aimed to help improve the product even more and not criticism by any means :)

melohagan commented 2 years ago

100% @rpmcoding Really appreciate the feedback! There's a number of tweaks we need to make to the datasources in general, so as always it's a matter of priority and what we can get done!