Reputation: 11
I have an error when I try to embed a stripe princing table on a web page.
When I copy the code provided by stripe during the cration of the pricing table and refresh the page it gives me unknown error. I used the HTML method to embed the pricing table. Here my code :
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>test</title>
</head>
<body>
<script async src="https://js.stripe.com/v3/pricing-table.js">
</script>
<stripe-pricing-table pricing-table-id="{{PRICING_TABLE_ID}}"
publishable-key="{{PUBLISHABLE_KEY}}">
</stripe-pricing-table>
</body>
</html>
Do you guys have any solution ?
Upvotes: 1
Views: 1292
Reputation: 1153
In order to test the pricing table in your local environment, you need to have have a local HTTP Server(e.g. Nginx, Apache). The pricing table requires a website domain to render. You need to run a local HTTP server and host your website’s index.html file over the localhost domain.
More details can be found here [1].
Upvotes: 1