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

Create Luxdesignpay #140

Open
wants to merge 54 commits into
base: sequence-diagram
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
55a452b
chore: update createOrder callback comment and example payload (#21)
gregjopa Feb 1, 2023
4ce5e89
chore(standard-integration): update fetch calls to match public docs …
gregjopa Feb 16, 2023
603f3a9
docs: main readme enhancements (#25)
jshawl Feb 16, 2023
a16cf30
chore: improve .env instructions (#27)
jshawl Feb 16, 2023
b15a936
chore: log URL with port on app start (#26)
jshawl Feb 17, 2023
5dd4bce
feat: add support for GitHub Codespaces (#52)
cnallam Jun 22, 2023
0806635
chore: use es6 syntax to match public docs (#59)
gregjopa Jul 24, 2023
3d333d5
add JSDoc links to REST APIs (#28)
jshawl Jul 28, 2023
e859c6f
Refactor the standard integration guide (#61)
gregjopa Aug 15, 2023
dabcc1e
chore(docs): fix path to index.html in readme (#62)
gregjopa Aug 15, 2023
ed5eb63
Standardize license format (#63)
gregjopa Aug 15, 2023
9363b5c
Refactor the backend for the advanced integration guide (#64)
gregjopa Aug 16, 2023
5a9a931
Use a separate container for the result message (#65)
gregjopa Aug 17, 2023
d84f10c
Align standard and advanced integrations (#66)
gregjopa Aug 17, 2023
dcd953d
Use double quotes to match the guides (#67)
gregjopa Aug 17, 2023
442e524
Improve the check for instrument declined use case (#68)
gregjopa Aug 17, 2023
1026de2
update order amount values (#69)
msarit Aug 18, 2023
fe0d689
Use a new client/server folder structure (#70)
gregjopa Aug 18, 2023
43d675a
Use GitHub Actions to enforce code formatting and lint rules (#72)
gregjopa Aug 21, 2023
9c9ed82
Improve config for codespaces (#71)
KalpanaReddyC Aug 21, 2023
bb8bab4
Respect exit codes in CI and format json (#73)
gregjopa Aug 21, 2023
1fedc8d
Add nodemon for restarting server on changes (#74)
prophen Aug 21, 2023
5788f93
Stop quoting values in example env files (#75)
gregjopa Aug 21, 2023
1d0216d
Use method definition syntax and fix glob pattern for prettier (#76)
gregjopa Aug 22, 2023
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
a2fe43e
Create Luxdesignpay
Kohart Aug 2, 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
40 changes: 40 additions & 0 deletions .devcontainer/advanced-integration-v1/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// For more details, see https://aka.ms/devcontainer.json.
{
"name": "PayPal Advanced Integration (v1)",
"image": "mcr.microsoft.com/devcontainers/javascript-node:20",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}/advanced-integration/v1",
// Use 'onCreateCommand' to run commands when creating the container.
"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.
"postAttachCommand": {
"Start server": "npm start"
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [8888],
"portsAttributes": {
"8888": {
"label": "Preview of Advanced Checkout Flow",
"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"
}
},
"customizations": {
"vscode": {
"extensions": ["vsls-contrib.codetour","PayPal.vscode-paypal"],
"settings": {
"git.openRepositoryInParentFolders": "always"
}
}
}
}
23 changes: 23 additions & 0 deletions .devcontainer/advanced-integration-v1/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"
40 changes: 40 additions & 0 deletions .devcontainer/advanced-integration-v2/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// For more details, see https://aka.ms/devcontainer.json.
{
"name": "PayPal Advanced Integration (v2)",
"image": "mcr.microsoft.com/devcontainers/javascript-node:20",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}/advanced-integration/v2",
// Use 'onCreateCommand' to run commands when creating the container.
"onCreateCommand": "bash ../../.devcontainer/advanced-integration-v2/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.
"postAttachCommand": {
"Start server": "npm start"
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [8888],
"portsAttributes": {
"8888": {
"label": "Preview of Advanced Checkout Flow",
"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"
}
},
"customizations": {
"vscode": {
"extensions": ["vsls-contrib.codetour","PayPal.vscode-paypal"],
"settings": {
"git.openRepositoryInParentFolders": "always"
}
}
}
}
23 changes: 23 additions & 0 deletions .devcontainer/advanced-integration-v2/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"
40 changes: 40 additions & 0 deletions .devcontainer/save-payment-method/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// For more details, see https://aka.ms/devcontainer.json.
{
"name": "PayPal Save Payment Method",
"image": "mcr.microsoft.com/devcontainers/javascript-node:20",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}/save-payment-method",
// Use 'onCreateCommand' to run commands when creating the container.
"onCreateCommand": "bash ../.devcontainer/save-payment-method/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.
"postAttachCommand": {
"Start server": "npm start"
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [8888],
"portsAttributes": {
"8888": {
"label": "Preview of Save Payment Method Flow",
"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"
}
},
"customizations": {
"vscode": {
"extensions": ["vsls-contrib.codetour","PayPal.vscode-paypal"],
"settings": {
"git.openRepositoryInParentFolders": "always"
}
}
}
}
23 changes: 23 additions & 0 deletions .devcontainer/save-payment-method/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 Save Payment Method 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 Save Payment Method 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"
40 changes: 40 additions & 0 deletions .devcontainer/standard-integration/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// For more details, see https://aka.ms/devcontainer.json.
{
"name": "PayPal Standard Integration",
"image": "mcr.microsoft.com/devcontainers/javascript-node:20",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}/standard-integration",
// Use 'onCreateCommand' to run commands when creating the container.
"onCreateCommand": "bash ../.devcontainer/standard-integration/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.
"postAttachCommand": {
"Start server": "npm start"
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [8888],
"portsAttributes": {
"8888": {
"label": "Preview of Standard Checkout Flow",
"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"
}
},
"customizations": {
"vscode": {
"extensions": ["vsls-contrib.codetour","PayPal.vscode-paypal"],
"settings": {
"git.openRepositoryInParentFolders": "always"
}
}
}
}
23 changes: 23 additions & 0 deletions .devcontainer/standard-integration/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 Standard 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 Standard 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"
11 changes: 11 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"env": {
"es2021": true
},
"extends": ["eslint:recommended"],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {}
}
35 changes: 35 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: validate
on:
# run on push but only for the main branch
push:
branches:
- main
# run for every pull request
pull_request: {}
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: 18

- name: 🧹 Check code formatting with Prettier
run: >
find . -name package.json -maxdepth 2 -type f | while read -r file; do
directory=$(dirname "$file")
cd "$directory" && npm run format:check && cd -
done

- name: 👕 Lint code with ESLint
run: >
find . -name package.json -maxdepth 3 -type f | while read -r file; do
directory=$(dirname "$file")
cd "$directory" && npm run lint && cd -
done
17 changes: 3 additions & 14 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
https://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

Expand Down Expand Up @@ -175,24 +175,13 @@

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright 2022 PayPal

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
Loading