Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update Python Flask/Ruby Sinatra examples (#160) #166

Open
wants to merge 35 commits into
base: esm-paypaljs
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
cb2f6a9
fix: temporarily revert back to old code examples for advanced (#78)
gregjopa Aug 31, 2023
fa12c9c
Update README with codespace details (#80)
sdarshale Sep 18, 2023
e26deb2
chore(docs): update readme feedback header section (#81)
sdarshale Sep 22, 2023
53f4e72
Update README.md for typo fix (#83)
cnallam Oct 2, 2023
d3c1ada
Rename the advanced integration "new" folder to "v1" (#85)
gregjopa Oct 4, 2023
5c89c3c
Add new card fields beta component (#84)
gregjopa Oct 5, 2023
ba6914a
Fix codespaces path
gregjopa Oct 5, 2023
f62771f
Use existing css to center beta card form
gregjopa Oct 6, 2023
5a3ea22
fix(docs): update instructions for replacing client-id in html (#86)
gregjopa Oct 6, 2023
f240e26
Add codespaces example for hosted fields v1 changes
gregjopa Oct 9, 2023
7c03b1a
Update the name of the v2 card fields codespaces config (#88)
gregjopa Oct 19, 2023
4fe6e5a
My Changes
cnallam Oct 24, 2023
39aeb3c
update advanced integration format to support v1 and v2 (#87)
devapplepaypal Oct 24, 2023
8895d07
Update codespaces links to support v1 and v2 (#89)
gregjopa Oct 24, 2023
91683d3
Clean up advanced-integration directory (#90)
gregjopa Oct 24, 2023
e453180
Fix codespace path for advanced integration v2 (#92)
gregjopa Oct 25, 2023
c4ee30f
Add ejs to better match the v2 advanced integration docs (#93)
gregjopa Oct 25, 2023
4603a51
Update instructions for v2 card fields (#97)
gregjopa Oct 26, 2023
4f82e50
feat: add example for saving a payment method (#99)
jshawl Nov 13, 2023
31e5b51
Update devcontainer.json with paypal vs code extension (#106)
NavinPayPal Dec 13, 2023
6419cb9
Update hosted-fields example to new standards (#109)
gregjopa Dec 20, 2023
ecc5ab5
Adding changes for devcontainer file for save payment method
NavinPayPal Jan 10, 2024
e385dc5
Updating Readme file to add Codespaces button
NavinPayPal Jan 11, 2024
a354698
Updating the devcontainer file
NavinPayPal Jan 16, 2024
a2074e9
Updating devcontainer file for save payment
NavinPayPal Jan 17, 2024
dd359b8
Merge pull request #115 from NavinPayPal/main
NavinPayPal Feb 20, 2024
633fe7e
fix one click payment popup issue (#126)
jshawl Apr 11, 2024
bd8f509
fix lint failure (#129)
jshawl Apr 12, 2024
a70265b
feat: update Card Fields integration with Billing Address (#131)
mchoun Jun 3, 2024
f61c97a
Add multiple language support for Standard & Advanced Integration (#152)
amsourav Sep 17, 2024
bb12328
Add client and server language selection while launching code spaces …
rekhaabaidipati Oct 1, 2024
4f9852f
feat: add support for php and java server sdk (#158)
amsourav Oct 10, 2024
faf8b4d
Fix client worrkspace foldere clone (#162)
rekhaabaidipati Oct 15, 2024
2cdd5d3
feat: migrate to dotnet server sdk (#163)
amsourav Oct 16, 2024
843672d
update Python Flask/Ruby Sinatra examples (#160)
LeonarthusMectus Oct 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// For more details, see https://aka.ms/devcontainer.json.
{
"name": "PayPal Advanced Integration",
"name": "advanced-integration-v1",
"image": "mcr.microsoft.com/devcontainers/javascript-node:20",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}/advanced-integration",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}/advanced-integration/v1",
// Use 'onCreateCommand' to run commands when creating the container.
"onCreateCommand": "bash ../.devcontainer/advanced-integration/welcome-message.sh",
"onCreateCommand": "bash ../../.devcontainer/advanced-integration-v1/welcome-message.sh",
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "npm install",
// Use 'postAttachCommand' to run commands when attaching to the container.
Expand All @@ -31,10 +31,10 @@
},
"customizations": {
"vscode": {
"extensions": ["vsls-contrib.codetour"],
"extensions": ["vsls-contrib.codetour","PayPal.vscode-paypal"],
"settings": {
"git.openRepositoryInParentFolders": "always"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// For more details, see https://aka.ms/devcontainer.json.
{
"name": "advanced-integration-v2/html/dotnet",
"image": "mcr.microsoft.com/devcontainers/dotnet:8.0",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
// Use 'onCreateCommand' to run commands when creating the container.
"onCreateCommand": "bash .devcontainer/advanced-integration-v2-html-dotnet/welcome-message.sh",
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "chmod +x .devcontainer/update_settings.sh && .devcontainer/update_settings.sh && chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-create",
// Use 'postAttachCommand' to run commands when attaching to the container.
"postAttachCommand": "chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-attach",
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [3000, 8080],
"portsAttributes": {
"8080": {
"label": "Preview of Advanced Checkout Flow"
},
"3000": {
"label": "HTML",
"onAutoForward": "openBrowserOnce"
}
},
"secrets": {
"PAYPAL_CLIENT_ID": {
"description": "Sandbox client ID of the application.",
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox"
},
"PAYPAL_CLIENT_SECRET": {
"description": "Sandbox secret of the application.",
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox"
}
},
"containerEnv": {
"VISIBLE_FOLDER_SERVER": "dotnet",
"VISIBLE_FOLDER_CLIENT": "html",
"VISIBLE_FOLDER_PROJECT": "advanced-integration",
"VISIBLE_FOLDER_VERSION": "v2"
},
"customizations": {
"vscode": {
"extensions": [
"vsls-contrib.codetour",
"PayPal.vscode-paypal",
"ms-dotnettools.csharp"
],
"settings": {
"git.openRepositoryInParentFolders": "always"
}
}
},
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "lts"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh

set -e

WELCOME_MESSAGE="
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\"

🛠️ Your environment is fully setup with all the required software.

🚀 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."

ALTERNATE_WELCOME_MESSAGE="
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\"

🛠️ Your environment is fully setup with all the required software.

🚀 The checkout page will automatically open in the browser after the server is started."

if [ -n "$PAYPAL_CLIENT_ID" ] && [ -n "$PAYPAL_CLIENT_SECRET" ]; then
WELCOME_MESSAGE="${ALTERNATE_WELCOME_MESSAGE}"
fi

sudo bash -c "echo \"${WELCOME_MESSAGE}\" > /usr/local/etc/vscode-dev-containers/first-run-notice.txt"
57 changes: 57 additions & 0 deletions .devcontainer/advanced-integration-v2-html-java/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// For more details, see https://aka.ms/devcontainer.json.
{
"name": "advanced-integration-v2/html/java",
"image": "mcr.microsoft.com/devcontainers/java:21",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
// Use 'onCreateCommand' to run commands when creating the container.
"onCreateCommand": "bash .devcontainer/advanced-integration-v2-html-java/welcome-message.sh",
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "chmod +x .devcontainer/update_settings.sh && .devcontainer/update_settings.sh && chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-create",
// Use 'postAttachCommand' to run commands when attaching to the container.
"postAttachCommand": "chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-attach",
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [3000, 8080],
"portsAttributes": {
"8080": {
"label": "Preview of Advanced Checkout Flow"
},
"3000": {
"label": "HTML",
"onAutoForward": "openBrowserOnce"
}
},
"secrets": {
"PAYPAL_CLIENT_ID": {
"description": "Sandbox client ID of the application.",
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox"
},
"PAYPAL_CLIENT_SECRET": {
"description": "Sandbox secret of the application.",
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox"
}
},
"containerEnv": {
"VISIBLE_FOLDER_SERVER": "java",
"VISIBLE_FOLDER_CLIENT": "html",
"VISIBLE_FOLDER_PROJECT": "advanced-integration",
"VISIBLE_FOLDER_VERSION": "v2"
},
"customizations": {
"vscode": {
"extensions": ["vsls-contrib.codetour", "PayPal.vscode-paypal"],
"settings": {
"git.openRepositoryInParentFolders": "always"
}
}
},
"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "22",
"jdkDistro": "tem",
"installMaven": "true"
},
"ghcr.io/devcontainers/features/node:1": {
"version": "lts"
}
}
}
23 changes: 23 additions & 0 deletions .devcontainer/advanced-integration-v2-html-java/welcome-message.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh

set -e

WELCOME_MESSAGE="
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\"

🛠️ Your environment is fully setup with all the required software.

🚀 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."

ALTERNATE_WELCOME_MESSAGE="
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\"

🛠️ Your environment is fully setup with all the required software.

🚀 The checkout page will automatically open in the browser after the server is started."

if [ -n "$PAYPAL_CLIENT_ID" ] && [ -n "$PAYPAL_CLIENT_SECRET" ]; then
WELCOME_MESSAGE="${ALTERNATE_WELCOME_MESSAGE}"
fi

sudo bash -c "echo \"${WELCOME_MESSAGE}\" > /usr/local/etc/vscode-dev-containers/first-run-notice.txt"
56 changes: 56 additions & 0 deletions .devcontainer/advanced-integration-v2-html-node/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// For more details, see https://aka.ms/devcontainer.json.
{
"name": "advanced-integration-v2/html/node",
"image": "mcr.microsoft.com/devcontainers/javascript-node:20",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
// Use 'onCreateCommand' to run commands when creating the container.
"onCreateCommand": "bash .devcontainer/advanced-integration-v2-html-node/welcome-message.sh",
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "chmod +x .devcontainer/update_settings.sh && .devcontainer/update_settings.sh && chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-create",
// Use 'postAttachCommand' to run commands when attaching to the container.
"postAttachCommand": "chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-attach",
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [3000, 8080],
"portsAttributes": {
"8080": {
"label": "Preview of Advanced Checkout Flow"
},
"3000": {
"label": "HTML",
"onAutoForward": "openBrowserOnce"
}
},
"secrets": {
"PAYPAL_CLIENT_ID": {
"description": "Sandbox client ID of the application.",
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox"
},
"PAYPAL_CLIENT_SECRET": {
"description": "Sandbox secret of the application.",
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox"
}
},
"containerEnv": {
"VISIBLE_FOLDER_SERVER": "node",
"VISIBLE_FOLDER_CLIENT": "html",
"VISIBLE_FOLDER_PROJECT": "advanced-integration",
"VISIBLE_FOLDER_VERSION": "v2"
},
"customizations": {
"vscode": {
"extensions": [
"vsls-contrib.codetour",
"PayPal.vscode-paypal",
"dbaeumer.vscode-eslint"
],
"settings": {
"git.openRepositoryInParentFolders": "always"
}
}
},
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "lts"
}
}
}
23 changes: 23 additions & 0 deletions .devcontainer/advanced-integration-v2-html-node/welcome-message.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh

set -e

WELCOME_MESSAGE="
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\"

🛠️ Your environment is fully setup with all the required software.

🚀 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."

ALTERNATE_WELCOME_MESSAGE="
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\"

🛠️ Your environment is fully setup with all the required software.

🚀 The checkout page will automatically open in the browser after the server is started."

if [ -n "$PAYPAL_CLIENT_ID" ] && [ -n "$PAYPAL_CLIENT_SECRET" ]; then
WELCOME_MESSAGE="${ALTERNATE_WELCOME_MESSAGE}"
fi

sudo bash -c "echo \"${WELCOME_MESSAGE}\" > /usr/local/etc/vscode-dev-containers/first-run-notice.txt"
56 changes: 56 additions & 0 deletions .devcontainer/advanced-integration-v2-html-php/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// For more details, see https://aka.ms/devcontainer.json.
{
"name": "advanced-integration-v2/html/php",
"image": "mcr.microsoft.com/devcontainers/php:8",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
// Use 'onCreateCommand' to run commands when creating the container.
"onCreateCommand": "bash .devcontainer/advanced-integration-v2-html-php/welcome-message.sh",
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "chmod +x .devcontainer/update_settings.sh && .devcontainer/update_settings.sh && chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-create",
// Use 'postAttachCommand' to run commands when attaching to the container.
"postAttachCommand": "chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-attach",
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [3000, 8080],
"portsAttributes": {
"8080": {
"label": "Preview of Advanced Checkout Flow"
},
"3000": {
"label": "HTML",
"onAutoForward": "openBrowserOnce"
}
},
"secrets": {
"PAYPAL_CLIENT_ID": {
"description": "Sandbox client ID of the application.",
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox"
},
"PAYPAL_CLIENT_SECRET": {
"description": "Sandbox secret of the application.",
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox"
}
},
"containerEnv": {
"VISIBLE_FOLDER_SERVER": "php",
"VISIBLE_FOLDER_CLIENT": "html",
"VISIBLE_FOLDER_PROJECT": "advanced-integration",
"VISIBLE_FOLDER_VERSION": "v2"
},
"customizations": {
"vscode": {
"extensions": [
"vsls-contrib.codetour",
"PayPal.vscode-paypal",
"xdebug.php-debug"
],
"settings": {
"git.openRepositoryInParentFolders": "always"
}
}
},
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "lts"
}
}
}
23 changes: 23 additions & 0 deletions .devcontainer/advanced-integration-v2-html-php/welcome-message.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh

set -e

WELCOME_MESSAGE="
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\"

🛠️ Your environment is fully setup with all the required software.

🚀 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."

ALTERNATE_WELCOME_MESSAGE="
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\"

🛠️ Your environment is fully setup with all the required software.

🚀 The checkout page will automatically open in the browser after the server is started."

if [ -n "$PAYPAL_CLIENT_ID" ] && [ -n "$PAYPAL_CLIENT_SECRET" ]; then
WELCOME_MESSAGE="${ALTERNATE_WELCOME_MESSAGE}"
fi

sudo bash -c "echo \"${WELCOME_MESSAGE}\" > /usr/local/etc/vscode-dev-containers/first-run-notice.txt"
Loading
Loading