Skip to content

Commit f3845f9

Browse files
author
Tim Martinak
committed
Merge branch 'main' into python-ruby-examples
2 parents b519dbf + bb12328 commit f3845f9

File tree

64 files changed

+1676
-171
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1676
-171
lines changed

.devcontainer/advanced-integration-v1/devcontainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// For more details, see https://aka.ms/devcontainer.json.
22
{
3-
"name": "PayPal Advanced Integration (v1)",
3+
"name": "advanced-integration-v1",
44
"image": "mcr.microsoft.com/devcontainers/javascript-node:20",
55
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}/advanced-integration/v1",
66
// Use 'onCreateCommand' to run commands when creating the container.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// For more details, see https://aka.ms/devcontainer.json.
2+
{
3+
"name": "advanced-integration-v2/html/dotnet",
4+
"image": "mcr.microsoft.com/devcontainers/dotnet:8.0",
5+
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
6+
// Use 'onCreateCommand' to run commands when creating the container.
7+
"onCreateCommand": "bash .devcontainer/advanced-integration-v2-html-dotnet/welcome-message.sh",
8+
// Use 'postCreateCommand' to run commands after the container is created.
9+
"postCreateCommand": "chmod +x .devcontainer/update_settings.sh && .devcontainer/update_settings.sh && chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-create",
10+
// Use 'postAttachCommand' to run commands when attaching to the container.
11+
"postAttachCommand": "chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-attach",
12+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
13+
"forwardPorts": [3000, 8080],
14+
"portsAttributes": {
15+
"8080": {
16+
"label": "Preview of Advanced Checkout Flow"
17+
},
18+
"3000": {
19+
"label": "HTML",
20+
"onAutoForward": "openBrowserOnce"
21+
}
22+
},
23+
"secrets": {
24+
"PAYPAL_CLIENT_ID": {
25+
"description": "Sandbox client ID of the application.",
26+
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox"
27+
},
28+
"PAYPAL_CLIENT_SECRET": {
29+
"description": "Sandbox secret of the application.",
30+
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox"
31+
}
32+
},
33+
"containerEnv": {
34+
"VISIBLE_FOLDER_SERVER": "dotnet",
35+
"VISIBLE_FOLDER_CLIENT": "html",
36+
"VISIBLE_FOLDER_PROJECT": "advanced-integration",
37+
"VISIBLE_FOLDER_VERSION": "v2"
38+
},
39+
"customizations": {
40+
"vscode": {
41+
"extensions": [
42+
"vsls-contrib.codetour",
43+
"PayPal.vscode-paypal",
44+
"ms-dotnettools.csharp"
45+
],
46+
"settings": {
47+
"git.openRepositoryInParentFolders": "always"
48+
}
49+
}
50+
},
51+
"features": {
52+
"ghcr.io/devcontainers/features/node:1": {
53+
"version": "lts"
54+
}
55+
}
56+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// For more details, see https://aka.ms/devcontainer.json.
2+
{
3+
"name": "advanced-integration-v2/html/java",
4+
"image": "mcr.microsoft.com/devcontainers/java:21",
5+
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
6+
// Use 'onCreateCommand' to run commands when creating the container.
7+
"onCreateCommand": "bash .devcontainer/advanced-integration-v2-html-java/welcome-message.sh",
8+
// Use 'postCreateCommand' to run commands after the container is created.
9+
"postCreateCommand": "chmod +x .devcontainer/update_settings.sh && .devcontainer/update_settings.sh && chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-create",
10+
// Use 'postAttachCommand' to run commands when attaching to the container.
11+
"postAttachCommand": "chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-attach",
12+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
13+
"forwardPorts": [3000, 8080],
14+
"portsAttributes": {
15+
"8080": {
16+
"label": "Preview of Advanced Checkout Flow"
17+
},
18+
"3000": {
19+
"label": "HTML",
20+
"onAutoForward": "openBrowserOnce"
21+
}
22+
},
23+
"secrets": {
24+
"PAYPAL_CLIENT_ID": {
25+
"description": "Sandbox client ID of the application.",
26+
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox"
27+
},
28+
"PAYPAL_CLIENT_SECRET": {
29+
"description": "Sandbox secret of the application.",
30+
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox"
31+
}
32+
},
33+
"containerEnv": {
34+
"VISIBLE_FOLDER_SERVER": "java",
35+
"VISIBLE_FOLDER_CLIENT": "html",
36+
"VISIBLE_FOLDER_PROJECT": "advanced-integration",
37+
"VISIBLE_FOLDER_VERSION": "v2"
38+
},
39+
"customizations": {
40+
"vscode": {
41+
"extensions": ["vsls-contrib.codetour", "PayPal.vscode-paypal"],
42+
"settings": {
43+
"git.openRepositoryInParentFolders": "always"
44+
}
45+
}
46+
},
47+
"features": {
48+
"ghcr.io/devcontainers/features/java:1": {
49+
"version": "22",
50+
"jdkDistro": "tem",
51+
"installMaven": "true"
52+
},
53+
"ghcr.io/devcontainers/features/node:1": {
54+
"version": "lts"
55+
}
56+
}
57+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
WELCOME_MESSAGE="
6+
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\"
7+
8+
🛠️ Your environment is fully setup with all the required software.
9+
10+
🚀 Once you rename the \".env.example\" file to \".env\" and update \"PAYPAL_CLIENT_ID\" and \"PAYPAL_CLIENT_SECRET\", the checkout page will automatically open in the browser after the server is restarted."
11+
12+
ALTERNATE_WELCOME_MESSAGE="
13+
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\"
14+
15+
🛠️ Your environment is fully setup with all the required software.
16+
17+
🚀 The checkout page will automatically open in the browser after the server is started."
18+
19+
if [ -n "$PAYPAL_CLIENT_ID" ] && [ -n "$PAYPAL_CLIENT_SECRET" ]; then
20+
WELCOME_MESSAGE="${ALTERNATE_WELCOME_MESSAGE}"
21+
fi
22+
23+
sudo bash -c "echo \"${WELCOME_MESSAGE}\" > /usr/local/etc/vscode-dev-containers/first-run-notice.txt"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// For more details, see https://aka.ms/devcontainer.json.
2+
{
3+
"name": "advanced-integration-v2/html/node",
4+
"image": "mcr.microsoft.com/devcontainers/javascript-node:20",
5+
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
6+
// Use 'onCreateCommand' to run commands when creating the container.
7+
"onCreateCommand": "bash .devcontainer/advanced-integration-v2-html-node/welcome-message.sh",
8+
// Use 'postCreateCommand' to run commands after the container is created.
9+
"postCreateCommand": "chmod +x .devcontainer/update_settings.sh && .devcontainer/update_settings.sh && chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-create",
10+
// Use 'postAttachCommand' to run commands when attaching to the container.
11+
"postAttachCommand": "chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-attach",
12+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
13+
"forwardPorts": [3000, 8080],
14+
"portsAttributes": {
15+
"8080": {
16+
"label": "Preview of Advanced Checkout Flow"
17+
},
18+
"3000": {
19+
"label": "HTML",
20+
"onAutoForward": "openBrowserOnce"
21+
}
22+
},
23+
"secrets": {
24+
"PAYPAL_CLIENT_ID": {
25+
"description": "Sandbox client ID of the application.",
26+
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox"
27+
},
28+
"PAYPAL_CLIENT_SECRET": {
29+
"description": "Sandbox secret of the application.",
30+
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox"
31+
}
32+
},
33+
"containerEnv": {
34+
"VISIBLE_FOLDER_SERVER": "node",
35+
"VISIBLE_FOLDER_CLIENT": "html",
36+
"VISIBLE_FOLDER_PROJECT": "advanced-integration",
37+
"VISIBLE_FOLDER_VERSION": "v2"
38+
},
39+
"customizations": {
40+
"vscode": {
41+
"extensions": [
42+
"vsls-contrib.codetour",
43+
"PayPal.vscode-paypal",
44+
"dbaeumer.vscode-eslint"
45+
],
46+
"settings": {
47+
"git.openRepositoryInParentFolders": "always"
48+
}
49+
}
50+
},
51+
"features": {
52+
"ghcr.io/devcontainers/features/node:1": {
53+
"version": "lts"
54+
}
55+
}
56+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
WELCOME_MESSAGE="
6+
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\"
7+
8+
🛠️ Your environment is fully setup with all the required software.
9+
10+
🚀 Once you rename the \".env.example\" file to \".env\" and update \"PAYPAL_CLIENT_ID\" and \"PAYPAL_CLIENT_SECRET\", the checkout page will automatically open in the browser after the server is restarted."
11+
12+
ALTERNATE_WELCOME_MESSAGE="
13+
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\"
14+
15+
🛠️ Your environment is fully setup with all the required software.
16+
17+
🚀 The checkout page will automatically open in the browser after the server is started."
18+
19+
if [ -n "$PAYPAL_CLIENT_ID" ] && [ -n "$PAYPAL_CLIENT_SECRET" ]; then
20+
WELCOME_MESSAGE="${ALTERNATE_WELCOME_MESSAGE}"
21+
fi
22+
23+
sudo bash -c "echo \"${WELCOME_MESSAGE}\" > /usr/local/etc/vscode-dev-containers/first-run-notice.txt"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// For more details, see https://aka.ms/devcontainer.json.
2+
{
3+
"name": "advanced-integration-v2/html/php",
4+
"image": "mcr.microsoft.com/devcontainers/php:8",
5+
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
6+
// Use 'onCreateCommand' to run commands when creating the container.
7+
"onCreateCommand": "bash .devcontainer/advanced-integration-v2-html-php/welcome-message.sh",
8+
// Use 'postCreateCommand' to run commands after the container is created.
9+
"postCreateCommand": "chmod +x .devcontainer/update_settings.sh && .devcontainer/update_settings.sh && chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-create",
10+
// Use 'postAttachCommand' to run commands when attaching to the container.
11+
"postAttachCommand": "chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-attach",
12+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
13+
"forwardPorts": [3000, 8080],
14+
"portsAttributes": {
15+
"8080": {
16+
"label": "Preview of Advanced Checkout Flow"
17+
},
18+
"3000": {
19+
"label": "HTML",
20+
"onAutoForward": "openBrowserOnce"
21+
}
22+
},
23+
"secrets": {
24+
"PAYPAL_CLIENT_ID": {
25+
"description": "Sandbox client ID of the application.",
26+
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox"
27+
},
28+
"PAYPAL_CLIENT_SECRET": {
29+
"description": "Sandbox secret of the application.",
30+
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox"
31+
}
32+
},
33+
"containerEnv": {
34+
"VISIBLE_FOLDER_SERVER": "php",
35+
"VISIBLE_FOLDER_CLIENT": "html",
36+
"VISIBLE_FOLDER_PROJECT": "advanced-integration",
37+
"VISIBLE_FOLDER_VERSION": "v2"
38+
},
39+
"customizations": {
40+
"vscode": {
41+
"extensions": [
42+
"vsls-contrib.codetour",
43+
"PayPal.vscode-paypal",
44+
"xdebug.php-debug"
45+
],
46+
"settings": {
47+
"git.openRepositoryInParentFolders": "always"
48+
}
49+
}
50+
},
51+
"features": {
52+
"ghcr.io/devcontainers/features/node:1": {
53+
"version": "lts"
54+
}
55+
}
56+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
WELCOME_MESSAGE="
6+
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\"
7+
8+
🛠️ Your environment is fully setup with all the required software.
9+
10+
🚀 Once you rename the \".env.example\" file to \".env\" and update \"PAYPAL_CLIENT_ID\" and \"PAYPAL_CLIENT_SECRET\", the checkout page will automatically open in the browser after the server is restarted."
11+
12+
ALTERNATE_WELCOME_MESSAGE="
13+
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\"
14+
15+
🛠️ Your environment is fully setup with all the required software.
16+
17+
🚀 The checkout page will automatically open in the browser after the server is started."
18+
19+
if [ -n "$PAYPAL_CLIENT_ID" ] && [ -n "$PAYPAL_CLIENT_SECRET" ]; then
20+
WELCOME_MESSAGE="${ALTERNATE_WELCOME_MESSAGE}"
21+
fi
22+
23+
sudo bash -c "echo \"${WELCOME_MESSAGE}\" > /usr/local/etc/vscode-dev-containers/first-run-notice.txt"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// For more details, see https://aka.ms/devcontainer.json.
2+
{
3+
"name": " advanced-integration-v2/react/dotnet",
4+
"image": "mcr.microsoft.com/devcontainers/dotnet:8.0",
5+
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
6+
// Use 'onCreateCommand' to run commands when creating the container.
7+
"onCreateCommand": "bash .devcontainer/advanced-integration-v2-react-dotnet/welcome-message.sh",
8+
// Use 'postCreateCommand' to run commands after the container is created.
9+
"postCreateCommand": "chmod +x .devcontainer/update_settings.sh && .devcontainer/update_settings.sh && chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-create",
10+
// Use 'postAttachCommand' to run commands when attaching to the container.
11+
"postAttachCommand": "chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-attach",
12+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
13+
"forwardPorts": [3000, 8080],
14+
"portsAttributes": {
15+
"8080": {
16+
"label": "Preview of Advanced Checkout Flow"
17+
},
18+
"3000": {
19+
"label": "React",
20+
"onAutoForward": "openBrowserOnce"
21+
}
22+
},
23+
"secrets": {
24+
"PAYPAL_CLIENT_ID": {
25+
"description": "Sandbox client ID of the application.",
26+
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox"
27+
},
28+
"PAYPAL_CLIENT_SECRET": {
29+
"description": "Sandbox secret of the application.",
30+
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox"
31+
}
32+
},
33+
"containerEnv": {
34+
"VISIBLE_FOLDER_SERVER": "dotnet",
35+
"VISIBLE_FOLDER_CLIENT": "react",
36+
"VISIBLE_FOLDER_PROJECT": "advanced-integration",
37+
"VISIBLE_FOLDER_VERSION": "v2"
38+
},
39+
"customizations": {
40+
"vscode": {
41+
"extensions": [
42+
"vsls-contrib.codetour",
43+
"PayPal.vscode-paypal",
44+
"ms-dotnettools.csharp"
45+
],
46+
"settings": {
47+
"git.openRepositoryInParentFolders": "always"
48+
}
49+
}
50+
},
51+
"features": {
52+
"ghcr.io/devcontainers/features/node:1": {
53+
"version": "lts"
54+
}
55+
}
56+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
WELCOME_MESSAGE="
6+
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\"
7+
8+
🛠️ Your environment is fully setup with all the required software.
9+
10+
🚀 Once you rename the \".env.example\" file to \".env\" and update \"PAYPAL_CLIENT_ID\" and \"PAYPAL_CLIENT_SECRET\", the checkout page will automatically open in the browser after the server is restarted."
11+
12+
ALTERNATE_WELCOME_MESSAGE="
13+
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\"
14+
15+
🛠️ Your environment is fully setup with all the required software.
16+
17+
🚀 The checkout page will automatically open in the browser after the server is started."
18+
19+
if [ -n "$PAYPAL_CLIENT_ID" ] && [ -n "$PAYPAL_CLIENT_SECRET" ]; then
20+
WELCOME_MESSAGE="${ALTERNATE_WELCOME_MESSAGE}"
21+
fi
22+
23+
sudo bash -c "echo \"${WELCOME_MESSAGE}\" > /usr/local/etc/vscode-dev-containers/first-run-notice.txt"

0 commit comments

Comments
 (0)