Stripe Problems

Hello Everyone,

I am trying to implement stripe payments in my app. I've been able to move a little bit forward (i guess), the problem is when i click on my button to do the checkout the app send me to this http://localhost:3000/undefined. And i also receive this message on the page.

**Notice** : file_put_contents(): Send of 50 bytes failed with errno=32 Broken pipe in **/Applications/Wappler.app/Contents/Resources/app/Shared/DMXzone/dmxAppCreator/UI/lib/htaccess_router.php** on line **6***

I am still using local host so i would like to know if it's normal to happen this and how can i move forward trying to implement stripe.

I am using a server action to create the checkout btw

<?php

ini_set('display_errors', 0); 
error_reporting(E_ALL & ~E_NOTICE);
require('../../../dmxConnectLib/dmxConnect.php');

$app = new \lib\App();

// Validate the new name: price_id
if (empty($_POST['price_id'])) {
    http_response_code(400);
    echo json_encode([
        'error' => true,
        'message' => 'Price ID is missing in POST',
        'received_data' => $_POST 
    ]);
    exit;
}

$app->define(<<<'JSON'
{
  "meta": {
    "$_POST": [
      {
        "type": "array",
        "name": "lineItems",
        "sub": [
          {
            "type": "text",
            "name": "price"
          },
          {
            "type": "number",
            "name": "quantity"
          }
        ]
      }
    ]
  },
  "exec": {
    "steps": {
      "name": "createCheckoutSession",
      "module": "stripe",
      "action": "createCheckoutSession",
      "options": {
        "mode": "subscription",
        "lineItemsType": "list",
        "line_items": [
          {
            "price": "{{$_POST.price_id}}",
            "quantity": 1
          }
        ],
        "success_url": "http://localhost:3000/onboarding.php?session_id={CHECKOUT_SESSION_ID}",
        "cancel_url": "http://localhost:3000/payment.php"
      },
      "outputType": "object",
      "meta": [
        {
          "name": "after_expiration",
          "type": "object",
          "ref": "stripe_payment_pages_checkout_session_after_expiration"
        },
        {
          "name": "allow_promotion_codes",
          "type": "boolean"
        },
        {
          "name": "amount_subtotal",
          "type": "number"
        },
        {
          "name": "amount_total",
          "type": "number"
        },
        {
          "name": "automatic_tax",
          "type": "object",
          "ref": "stripe_payment_pages_checkout_session_automatic_tax"
        },
        {
          "name": "billing_address_collection",
          "type": "text"
        },
        {
          "name": "cancel_url",
          "type": "text"
        },
        {
          "name": "client_reference_id",
          "type": "text"
        },
        {
          "name": "client_secret",
          "type": "text"
        },
        {
          "name": "consent",
          "type": "object",
          "ref": "stripe_payment_pages_checkout_session_consent"
        },
        {
          "name": "consent_collection",
          "type": "object",
          "ref": "stripe_payment_pages_checkout_session_consent_collection"
        },
        {
          "name": "created",
          "type": "number"
        },
        {
          "name": "currency",
          "type": "text"
        },
        {
          "name": "currency_conversion",
          "type": "object",
          "ref": "stripe_payment_pages_checkout_session_currency_conversion"
        },
        {
          "name": "custom_fields",
          "type": "array",
          "sub": [
            {
              "name": "dropdown",
              "type": "object",
              "ref": "stripe_payment_pages_checkout_session_custom_fields_dropdown"
            },
            {
              "name": "key",
              "type": "text"
            },
            {
              "name": "label",
              "type": "object",
              "ref": "stripe_payment_pages_checkout_session_custom_fields_label"
            },
            {
              "name": "numeric",
              "type": "object",
              "ref": "stripe_payment_pages_checkout_session_custom_fields_numeric"
            },
            {
              "name": "optional",
              "type": "boolean"
            },
            {
              "name": "text",
              "type": "object",
              "ref": "stripe_payment_pages_checkout_session_custom_fields_text"
            },
            {
              "name": "type",
              "type": "text"
            }
          ]
        },
        {
          "name": "custom_text",
          "type": "object",
          "ref": "stripe_payment_pages_checkout_session_custom_text"
        },
        {
          "name": "customer",
          "type": "text",
          "expand": [
            "stripe_customer",
            "stripe_deleted_customer"
          ]
        },
        {
          "name": "customer_creation",
          "type": "text"
        },
        {
          "name": "customer_details",
          "type": "object",
          "ref": "stripe_payment_pages_checkout_session_customer_details"
        },
        {
          "name": "customer_email",
          "type": "text"
        },
        {
          "name": "expires_at",
          "type": "number"
        },
        {
          "name": "id",
          "type": "text"
        },
        {
          "name": "invoice",
          "type": "text",
          "expand": [
            "stripe_invoice"
          ]
        },
        {
          "name": "invoice_creation",
          "type": "object",
          "ref": "stripe_payment_pages_checkout_session_invoice_creation"
        },
        {
          "name": "line_items",
          "type": "object",
          "sub": [
            {
              "name": "data",
              "type": "array",
              "sub": [
                {
                  "name": "amount_discount",
                  "type": "number"
                },
                {
                  "name": "amount_subtotal",
                  "type": "number"
                },
                {
                  "name": "amount_tax",
                  "type": "number"
                },
                {
                  "name": "amount_total",
                  "type": "number"
                },
                {
                  "name": "currency",
                  "type": "text"
                },
                {
                  "name": "description",
                  "type": "text"
                },
                {
                  "name": "discounts",
                  "type": "array",
                  "sub": [
                    {
                      "name": "amount",
                      "type": "number"
                    },
                    {
                      "name": "discount",
                      "type": "object",
                      "ref": "stripe_discount"
                    }
                  ]
                },
                {
                  "name": "id",
                  "type": "text"
                },
                {
                  "name": "object",
                  "type": "text"
                },
                {
                  "name": "price",
                  "type": "object",
                  "ref": "stripe_price"
                },
                {
                  "name": "quantity",
                  "type": "number"
                },
                {
                  "name": "taxes",
                  "type": "array",
                  "sub": [
                    {
                      "name": "amount",
                      "type": "number"
                    },
                    {
                      "name": "rate",
                      "type": "object",
                      "ref": "stripe_tax_rate"
                    },
                    {
                      "name": "taxability_reason",
                      "type": "text"
                    },
                    {
                      "name": "taxable_amount",
                      "type": "number"
                    }
                  ]
                }
              ]
            },
            {
              "name": "has_more",
              "type": "boolean"
            },
            {
              "name": "object",
              "type": "text"
            },
            {
              "name": "url",
              "type": "text"
            }
          ]
        },
        {
          "name": "livemode",
          "type": "boolean"
        },
        {
          "name": "locale",
          "type": "text"
        },
        {
          "name": "metadata",
          "type": "object"
        },
        {
          "name": "mode",
          "type": "text"
        },
        {
          "name": "object",
          "type": "text"
        },
        {
          "name": "payment_intent",
          "type": "text",
          "expand": [
            "stripe_payment_intent"
          ]
        },
        {
          "name": "payment_link",
          "type": "text",
          "expand": [
            "stripe_payment_link"
          ]
        },
        {
          "name": "payment_method_collection",
          "type": "text"
        },
        {
          "name": "payment_method_configuration_details",
          "type": "object",
          "ref": "stripe_payment_method_config_biz_payment_method_configuration_details"
        },
        {
          "name": "payment_method_options",
          "type": "object",
          "ref": "stripe_checkout_session_payment_method_options"
        },
        {
          "name": "payment_method_types",
          "type": "array",
          "sub": []
        },
        {
          "name": "payment_status",
          "type": "text"
        },
        {
          "name": "phone_number_collection",
          "type": "object",
          "ref": "stripe_payment_pages_checkout_session_phone_number_collection"
        },
        {
          "name": "recovered_from",
          "type": "text"
        },
        {
          "name": "redirect_on_completion",
          "type": "text"
        },
        {
          "name": "return_url",
          "type": "text"
        },
        {
          "name": "setup_intent",
          "type": "text",
          "expand": [
            "stripe_setup_intent"
          ]
        },
        {
          "name": "shipping_address_collection",
          "type": "object",
          "ref": "stripe_payment_pages_checkout_session_shipping_address_collection"
        },
        {
          "name": "shipping_cost",
          "type": "object",
          "ref": "stripe_payment_pages_checkout_session_shipping_cost"
        },
        {
          "name": "shipping_details",
          "type": "object",
          "ref": "stripe_shipping"
        },
        {
          "name": "shipping_options",
          "type": "array",
          "sub": [
            {
              "name": "shipping_amount",
              "type": "number"
            },
            {
              "name": "shipping_rate",
              "type": "text",
              "expand": [
                "stripe_shipping_rate"
              ]
            }
          ]
        },
        {
          "name": "status",
          "type": "text"
        },
        {
          "name": "submit_type",
          "type": "text"
        },
        {
          "name": "subscription",
          "type": "text",
          "expand": [
            "stripe_subscription"
          ]
        },
        {
          "name": "success_url",
          "type": "text"
        },
        {
          "name": "tax_id_collection",
          "type": "object",
          "ref": "stripe_payment_pages_checkout_session_tax_id_collection"
        },
        {
          "name": "total_details",
          "type": "object",
          "ref": "stripe_payment_pages_checkout_session_total_details"
        },
        {
          "name": "ui_mode",
          "type": "text"
        },
        {
          "name": "url",
          "type": "text"
        }
      ]
    }
  }
}
JSON
);
?>```

Thanks, 
Rodrigo