Stripe: Options should be passed in their own array after $params

Stripe tells us the PHP code generated by Wappler is not properly laid out. The ‘__extra’ array should be separate from the main parameters:

Stripe error message in Dev Tool: "Options found in $params: api_key, stripe_account. Options should be passed in their own array after $params. (HINT: pass an empty array to $params if you do not have any.)"

Could you ensure the params and options of the APIs sent to Stripe are aligned with what Stripe wants to receive? Move ‘__extra’ out of options?

"name": "retrieveCheckoutSession",
        "module": "stripe",
        "action": "retrieveCheckoutSession",
        "options": {
          "session": "{{sessionId}}",
          "__extra": {
            "stripe_account": "{{connectedAcct}}",
            "api_key": "sk_test_51IXXEiBfY9idGe2uHSBjOVy2jueHm8KquCgGUx15N7MPUYm23Q6cNGxKM0qmqBbpNZICqtTdWMVWj6G7MFZ0jKJ000Nf9efTvm"

I’m getting the same error message. I have not figured out where to go from here.

Param “Stripe account” needs his own array. So you have to pass two arguments if you want to pass Stripe account. For example :

your_method([“limilt” => 10], [“stripe_account” => "stripeId])

If you don’t need/want first argument, so pass an empty array like that :

your_method(, [“stripe_account” => "stripeId])

:slight_smile:

1 Like