Closed rpmcoding closed 2 years ago
@melohagan fantastic thanks. In what format should we add parameters to the parameters textarea under fields on the plugin page please?
Hey @rpmcoding
I'm not sure what you mean. Is there a particular CRUD function you are referring to?
@melohagan sorry, yes create.
Am referring to this textarea.
Thanks, that'll be a JSON object. E.g.
{
"line_items": [
{
"price": "price_H5ggYwtDq4fbrJ",
"quantity": 2
}
]
}
Official docs here: https://stripe.com/docs/api/checkout/sessions/create?lang=node Select Node.js from the dropdown:
@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.
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.
@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 :)
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!
It would be amazing if you or someone else is able to create a plugin for Stripe Checkout.