-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(enabler): fixing build and start issues
- Loading branch information
1 parent
afaf7c2
commit 71472f8
Showing
19 changed files
with
1,752 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,5 @@ | ||
VITE_ADMIN_CLIENT_ID=IYg3zsamDxEtBVhN0GXPfSyz | ||
VITE_ADMIN_CLIENT_SECRET=Ti5_ciOUgU76hu0hq75shf0V3Fg4Oean | ||
VITE_ADMIN_SCOPE=manage_project:commercetools-checkout | ||
VITE_REGION=europe-west1.gcp | ||
VITE_CART_ID=f49ea44e-a189-4f9f-b17f-b09f29da49c9 |
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,24 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
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,7 @@ | ||
declare module "@adyen/adyen-web" | ||
declare module "@adyen/adyen-web/dist/types/components/ApplePay" | ||
declare module "@adyen/adyen-web/dist/types/components/GooglePay" | ||
declare module "@adyen/adyen-web/dist/types/core" | ||
declare module "@adyen/adyen-web/dist/types/core/core" | ||
declare module "@adyen/adyen-web/dist/types/components/Redirect/Redirect" | ||
declare module "@adyen/adyen-web/dist/types/core/types" |
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,73 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite + TS</title> | ||
<script> | ||
var __VITE_ADMIN_CLIENT_ID__ = !'%VITE_ADMIN_CLIENT_ID%'.startsWith('%') && '%VITE_ADMIN_CLIENT_ID%' || 'IYg3zsamDxEtBVhN0GXPfSyz'; | ||
var __VITE_ADMIN_CLIENT_SECRET__ = !'%VITE_ADMIN_CLIENT_SECRET%'.startsWith('%') && '%VITE_ADMIN_CLIENT_SECRET%' || 'Ti5_ciOUgU76hu0hq75shf0V3Fg4Oean'; | ||
var __VITE_ADMIN_SCOPE__ = !'%VITE_ADMIN_SCOPE%'.startsWith('%') && '%VITE_ADMIN_SCOPE%' || 'manage_project:commercetools-checkout'; | ||
var __VITE_REGION__ = !'%VITE_REGION%'.startsWith('%') && '%VITE_REGION%' || 'europe-west1.gcp'; | ||
var __VITE_CART_ID__ = !'%VITE_CART_ID%'.startsWith('%') && '%VITE_CART_ID%' || 'f49ea44e-a189-4f9f-b17f-b09f29da49c9'; | ||
</script> | ||
<script src="./session.js"></script> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module"> | ||
import { Connector } from '/enabler/src/main.ts'; | ||
|
||
const sessionId = await getSessionId(); | ||
|
||
const connector = new Connector({ | ||
connectorUrl: "http://0.0.0.0:5000", | ||
sessionId: sessionId, | ||
config: { | ||
|
||
}, | ||
onComplete: ({ isSuccess, paymentReference }) => { | ||
console.log('onComplete', { isSuccess, paymentReference }); | ||
}, | ||
}); | ||
|
||
connector.createComponent('dropin', { | ||
config: {}, | ||
}) | ||
.then(e => e.mount('#adyen-dropin-component')); | ||
|
||
connector.createComponent('card', { | ||
config: {}, | ||
}) | ||
.then(e => e.mount('#adyen-card-component')); | ||
|
||
connector.createComponent('ideal', { | ||
config: {showPayButton: false}, | ||
}) | ||
.then(e => e.mount('#adyen-ideal-component')); | ||
|
||
connector.createComponent('googlepay', {}) | ||
.then(e => e.mount('#adyen-googlepay-component')); | ||
</script> | ||
|
||
<div class="container-md p-3 border m-3"> | ||
<div class="container-md p-3 border m-3"> | ||
<h5>Adyen dropin component:</h5> | ||
<div id="adyen-dropin-component"></div> | ||
</div> | ||
<div class="container-md p-3 border m-3"> | ||
<h5>Adyen card component:</h5> | ||
<div id="adyen-card-component"></div> | ||
</div> | ||
<div class="container-md p-3 border m-3"> | ||
<h5>Ideal component:</h5> | ||
<div id="adyen-ideal-component"></div> | ||
</div> | ||
<div class="container-md p-3 border m-3"> | ||
<h5>Googlepay component:</h5> | ||
<div id="adyen-googlepay-component"></div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.