-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Max Beatty
committed
Mar 25, 2021
1 parent
e5cfd8a
commit 6553e53
Showing
6 changed files
with
562 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# snowpack | ||
|
||
Use [Snowpack](https://www.snowpack.dev/), "a lightning-fast frontend build tool, designed for the modern web", to build a simple payment form with Square Web SDK. | ||
|
||
## How to use | ||
|
||
Clone, install, and start: | ||
|
||
```sh | ||
# clone from github | ||
git clone https://github.com/square/web-sdk.git | ||
# go to example | ||
cd examples/snowpack | ||
# install dependencies | ||
npm install | ||
# start development server | ||
npm start | ||
``` | ||
|
||
Snowpack will open `index.html` which includes `pay.js` where Square Web SDK is set up to take a card payment. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html lange="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Square Web SDK Example</title> | ||
</head> | ||
|
||
<body> | ||
<div id="card"></div> | ||
<button type="button" id="pay">Pay $1.00</button> | ||
|
||
<script type="module" src="./pay.js"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.