From 098addc10ece5cd057cd32cec123ae1fb925c5d0 Mon Sep 17 00:00:00 2001 From: Louis Low Date: Wed, 18 Sep 2024 18:15:03 +0800 Subject: [PATCH 01/18] add client & server implementation in codespace --- .../devcontainer.json | 56 +++++++ .../welcome-message.sh | 23 +++ .../devcontainer.json | 57 +++++++ .../welcome-message.sh | 23 +++ .../devcontainer.json | 56 +++++++ .../welcome-message.sh | 23 +++ .../devcontainer.json | 56 +++++++ .../welcome-message.sh | 23 +++ .../devcontainer.json | 56 +++++++ .../welcome-message.sh | 23 +++ .../devcontainer.json | 57 +++++++ .../welcome-message.sh | 23 +++ .../devcontainer.json | 56 +++++++ .../welcome-message.sh | 23 +++ .../devcontainer.json | 56 +++++++ .../welcome-message.sh | 23 +++ .devcontainer/post-commands.sh | 104 +++++++++++++ .../devcontainer.json | 55 +++++++ .../welcome-message.sh | 23 +++ .../devcontainer.json | 56 +++++++ .../welcome-message.sh | 23 +++ .../devcontainer.json | 55 +++++++ .../welcome-message.sh | 23 +++ .../devcontainer.json | 55 +++++++ .../welcome-message.sh | 23 +++ .../devcontainer.json | 55 +++++++ .../welcome-message.sh | 23 +++ .../devcontainer.json | 56 +++++++ .../welcome-message.sh | 23 +++ .../devcontainer.json | 55 +++++++ .../welcome-message.sh | 23 +++ .../devcontainer.json | 55 +++++++ .../welcome-message.sh | 23 +++ .devcontainer/update_settings.sh | 140 ++++++++++++++++++ .gitignore | 4 + 35 files changed, 1508 insertions(+) create mode 100644 .devcontainer/advanced-integration-v2-html-dotnet/devcontainer.json create mode 100644 .devcontainer/advanced-integration-v2-html-dotnet/welcome-message.sh create mode 100644 .devcontainer/advanced-integration-v2-html-java/devcontainer.json create mode 100644 .devcontainer/advanced-integration-v2-html-java/welcome-message.sh create mode 100644 .devcontainer/advanced-integration-v2-html-node/devcontainer.json create mode 100644 .devcontainer/advanced-integration-v2-html-node/welcome-message.sh create mode 100644 .devcontainer/advanced-integration-v2-html-php/devcontainer.json create mode 100644 .devcontainer/advanced-integration-v2-html-php/welcome-message.sh create mode 100644 .devcontainer/advanced-integration-v2-react-dotnet/devcontainer.json create mode 100644 .devcontainer/advanced-integration-v2-react-dotnet/welcome-message.sh create mode 100644 .devcontainer/advanced-integration-v2-react-java/devcontainer.json create mode 100644 .devcontainer/advanced-integration-v2-react-java/welcome-message.sh create mode 100644 .devcontainer/advanced-integration-v2-react-node/devcontainer.json create mode 100644 .devcontainer/advanced-integration-v2-react-node/welcome-message.sh create mode 100644 .devcontainer/advanced-integration-v2-react-php/devcontainer.json create mode 100644 .devcontainer/advanced-integration-v2-react-php/welcome-message.sh create mode 100755 .devcontainer/post-commands.sh create mode 100644 .devcontainer/standard-integration-html-dotnet/devcontainer.json create mode 100644 .devcontainer/standard-integration-html-dotnet/welcome-message.sh create mode 100644 .devcontainer/standard-integration-html-java/devcontainer.json create mode 100644 .devcontainer/standard-integration-html-java/welcome-message.sh create mode 100644 .devcontainer/standard-integration-html-node/devcontainer.json create mode 100644 .devcontainer/standard-integration-html-node/welcome-message.sh create mode 100644 .devcontainer/standard-integration-html-php/devcontainer.json create mode 100644 .devcontainer/standard-integration-html-php/welcome-message.sh create mode 100644 .devcontainer/standard-integration-react-dotnet/devcontainer.json create mode 100644 .devcontainer/standard-integration-react-dotnet/welcome-message.sh create mode 100644 .devcontainer/standard-integration-react-java/devcontainer.json create mode 100644 .devcontainer/standard-integration-react-java/welcome-message.sh create mode 100644 .devcontainer/standard-integration-react-node/devcontainer.json create mode 100644 .devcontainer/standard-integration-react-node/welcome-message.sh create mode 100644 .devcontainer/standard-integration-react-php/devcontainer.json create mode 100644 .devcontainer/standard-integration-react-php/welcome-message.sh create mode 100755 .devcontainer/update_settings.sh diff --git a/.devcontainer/advanced-integration-v2-html-dotnet/devcontainer.json b/.devcontainer/advanced-integration-v2-html-dotnet/devcontainer.json new file mode 100644 index 00000000..88c465f9 --- /dev/null +++ b/.devcontainer/advanced-integration-v2-html-dotnet/devcontainer.json @@ -0,0 +1,56 @@ +// For more details, see https://aka.ms/devcontainer.json. +{ + "name": "PayPal 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" + } + } +} diff --git a/.devcontainer/advanced-integration-v2-html-dotnet/welcome-message.sh b/.devcontainer/advanced-integration-v2-html-dotnet/welcome-message.sh new file mode 100644 index 00000000..ae9a72f9 --- /dev/null +++ b/.devcontainer/advanced-integration-v2-html-dotnet/welcome-message.sh @@ -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" diff --git a/.devcontainer/advanced-integration-v2-html-java/devcontainer.json b/.devcontainer/advanced-integration-v2-html-java/devcontainer.json new file mode 100644 index 00000000..1d395202 --- /dev/null +++ b/.devcontainer/advanced-integration-v2-html-java/devcontainer.json @@ -0,0 +1,57 @@ +// For more details, see https://aka.ms/devcontainer.json. +{ + "name": "PayPal 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" + } + } +} \ No newline at end of file diff --git a/.devcontainer/advanced-integration-v2-html-java/welcome-message.sh b/.devcontainer/advanced-integration-v2-html-java/welcome-message.sh new file mode 100644 index 00000000..ae9a72f9 --- /dev/null +++ b/.devcontainer/advanced-integration-v2-html-java/welcome-message.sh @@ -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" diff --git a/.devcontainer/advanced-integration-v2-html-node/devcontainer.json b/.devcontainer/advanced-integration-v2-html-node/devcontainer.json new file mode 100644 index 00000000..a4f48d9f --- /dev/null +++ b/.devcontainer/advanced-integration-v2-html-node/devcontainer.json @@ -0,0 +1,56 @@ +// For more details, see https://aka.ms/devcontainer.json. +{ + "name": "PayPal 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" + } + } +} diff --git a/.devcontainer/advanced-integration-v2-html-node/welcome-message.sh b/.devcontainer/advanced-integration-v2-html-node/welcome-message.sh new file mode 100644 index 00000000..ae9a72f9 --- /dev/null +++ b/.devcontainer/advanced-integration-v2-html-node/welcome-message.sh @@ -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" diff --git a/.devcontainer/advanced-integration-v2-html-php/devcontainer.json b/.devcontainer/advanced-integration-v2-html-php/devcontainer.json new file mode 100644 index 00000000..72c8222f --- /dev/null +++ b/.devcontainer/advanced-integration-v2-html-php/devcontainer.json @@ -0,0 +1,56 @@ +// For more details, see https://aka.ms/devcontainer.json. +{ + "name": "PayPal 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" + } + } +} \ No newline at end of file diff --git a/.devcontainer/advanced-integration-v2-html-php/welcome-message.sh b/.devcontainer/advanced-integration-v2-html-php/welcome-message.sh new file mode 100644 index 00000000..ae9a72f9 --- /dev/null +++ b/.devcontainer/advanced-integration-v2-html-php/welcome-message.sh @@ -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" diff --git a/.devcontainer/advanced-integration-v2-react-dotnet/devcontainer.json b/.devcontainer/advanced-integration-v2-react-dotnet/devcontainer.json new file mode 100644 index 00000000..6728053f --- /dev/null +++ b/.devcontainer/advanced-integration-v2-react-dotnet/devcontainer.json @@ -0,0 +1,56 @@ +// For more details, see https://aka.ms/devcontainer.json. +{ + "name": "PayPal Advanced Integration (v2) - React + 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-react-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": "React", + "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": "react", + "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" + } + } +} diff --git a/.devcontainer/advanced-integration-v2-react-dotnet/welcome-message.sh b/.devcontainer/advanced-integration-v2-react-dotnet/welcome-message.sh new file mode 100644 index 00000000..ae9a72f9 --- /dev/null +++ b/.devcontainer/advanced-integration-v2-react-dotnet/welcome-message.sh @@ -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" diff --git a/.devcontainer/advanced-integration-v2-react-java/devcontainer.json b/.devcontainer/advanced-integration-v2-react-java/devcontainer.json new file mode 100644 index 00000000..5652a550 --- /dev/null +++ b/.devcontainer/advanced-integration-v2-react-java/devcontainer.json @@ -0,0 +1,57 @@ +// For more details, see https://aka.ms/devcontainer.json. +{ + "name": "PayPal Advanced Integration (v2) - React + 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-react-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": "React", + "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": "react", + "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" + } + } +} \ No newline at end of file diff --git a/.devcontainer/advanced-integration-v2-react-java/welcome-message.sh b/.devcontainer/advanced-integration-v2-react-java/welcome-message.sh new file mode 100644 index 00000000..ae9a72f9 --- /dev/null +++ b/.devcontainer/advanced-integration-v2-react-java/welcome-message.sh @@ -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" diff --git a/.devcontainer/advanced-integration-v2-react-node/devcontainer.json b/.devcontainer/advanced-integration-v2-react-node/devcontainer.json new file mode 100644 index 00000000..6ac4eb0f --- /dev/null +++ b/.devcontainer/advanced-integration-v2-react-node/devcontainer.json @@ -0,0 +1,56 @@ +// For more details, see https://aka.ms/devcontainer.json. +{ + "name": "PayPal Advanced Integration (v2) - React + 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-react-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": "React", + "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": "react", + "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" + } + } +} diff --git a/.devcontainer/advanced-integration-v2-react-node/welcome-message.sh b/.devcontainer/advanced-integration-v2-react-node/welcome-message.sh new file mode 100644 index 00000000..ae9a72f9 --- /dev/null +++ b/.devcontainer/advanced-integration-v2-react-node/welcome-message.sh @@ -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" diff --git a/.devcontainer/advanced-integration-v2-react-php/devcontainer.json b/.devcontainer/advanced-integration-v2-react-php/devcontainer.json new file mode 100644 index 00000000..c31367fe --- /dev/null +++ b/.devcontainer/advanced-integration-v2-react-php/devcontainer.json @@ -0,0 +1,56 @@ +// For more details, see https://aka.ms/devcontainer.json. +{ + "name": "PayPal Advanced Integration (v2) - React + 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-react-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": "React", + "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": "react", + "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" + } + } +} \ No newline at end of file diff --git a/.devcontainer/advanced-integration-v2-react-php/welcome-message.sh b/.devcontainer/advanced-integration-v2-react-php/welcome-message.sh new file mode 100644 index 00000000..ae9a72f9 --- /dev/null +++ b/.devcontainer/advanced-integration-v2-react-php/welcome-message.sh @@ -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" diff --git a/.devcontainer/post-commands.sh b/.devcontainer/post-commands.sh new file mode 100755 index 00000000..db59d951 --- /dev/null +++ b/.devcontainer/post-commands.sh @@ -0,0 +1,104 @@ +#!/bin/bash + +set -e + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +WORKSPACE_DIR="$( cd "$SCRIPT_DIR/.." &> /dev/null && pwd )" + +VISIBLE_FOLDER_SERVER="${VISIBLE_FOLDER_SERVER}" +VISIBLE_FOLDER_CLIENT="${VISIBLE_FOLDER_CLIENT}" +VISIBLE_FOLDER_PROJECT="${VISIBLE_FOLDER_PROJECT}" +VISIBLE_FOLDER_VERSION="${VISIBLE_FOLDER_VERSION}" + +# Set up SERVER_DIR & CLIENT_DIR +if [ -z "$VISIBLE_FOLDER_VERSION" ]; then + SERVER_DIR="${WORKSPACE_DIR}/${VISIBLE_FOLDER_PROJECT}/server" + CLIENT_DIR="${WORKSPACE_DIR}/${VISIBLE_FOLDER_PROJECT}/client/${VISIBLE_FOLDER_CLIENT}" +else + SERVER_DIR="${WORKSPACE_DIR}/${VISIBLE_FOLDER_PROJECT}/${VISIBLE_FOLDER_VERSION}/server" + CLIENT_DIR="${WORKSPACE_DIR}/${VISIBLE_FOLDER_PROJECT}/${VISIBLE_FOLDER_VERSION}/client/${VISIBLE_FOLDER_CLIENT}/client" +fi + +# Backend setup functions +setup_backend() { + case "$VISIBLE_FOLDER_SERVER" in + node) + cd "$SERVER_DIR/node" && npm install + ;; + java) + cd "$SERVER_DIR" && touch java/.env && cd java && mvn clean install + ;; + dotnet) + cd "$SERVER_DIR/dotnet" && dotnet restore + ;; + php) + cd "$SERVER_DIR" && touch php/.env && cd php && composer install + ;; + *) + echo "Unknown server: $VISIBLE_FOLDER_SERVER" + exit 1 + ;; + esac +} + +# Frontend setup functions +setup_frontend() { + cd "$CLIENT_DIR" && npm install +} + +# Backend start functions +start_backend() { + case "$VISIBLE_FOLDER_SERVER" in + node) + cd "$SERVER_DIR/node" && npm start + ;; + java) + cd "$SERVER_DIR/java" && mvn spring-boot:run + ;; + dotnet) + cd "$SERVER_DIR/dotnet" && dotnet run + ;; + php) + cd "$SERVER_DIR/php" && composer start + ;; + *) + echo "Unknown server: $VISIBLE_FOLDER_SERVER" + exit 1 + ;; + esac +} + +# Frontend start functions +start_frontend() { + cd "$CLIENT_DIR" && npm run start --no-analytics +} + +# Post-create commands +post_create() { + echo "Running post-create commands..." + setup_backend + setup_frontend +} + +# Post-attach commands +post_attach() { + echo "Running post-attach commands..." + start_backend & + start_frontend +} + +# Main execution +case "$1" in + post-create) + post_create + ;; + post-attach) + post_attach + ;; + *) + echo "Usage: $0 {post-create|post-attach}" + exit 1 + ;; +esac + +exit 0 \ No newline at end of file diff --git a/.devcontainer/standard-integration-html-dotnet/devcontainer.json b/.devcontainer/standard-integration-html-dotnet/devcontainer.json new file mode 100644 index 00000000..c97cbb18 --- /dev/null +++ b/.devcontainer/standard-integration-html-dotnet/devcontainer.json @@ -0,0 +1,55 @@ +// For more details, see https://aka.ms/devcontainer.json. +{ + "name": "PayPal Standard Integration - 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/standard-integration-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 Standard 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": "standard-integration" + }, + "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" + } + } +} diff --git a/.devcontainer/standard-integration-html-dotnet/welcome-message.sh b/.devcontainer/standard-integration-html-dotnet/welcome-message.sh new file mode 100644 index 00000000..78cce216 --- /dev/null +++ b/.devcontainer/standard-integration-html-dotnet/welcome-message.sh @@ -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" diff --git a/.devcontainer/standard-integration-html-java/devcontainer.json b/.devcontainer/standard-integration-html-java/devcontainer.json new file mode 100644 index 00000000..ae903e74 --- /dev/null +++ b/.devcontainer/standard-integration-html-java/devcontainer.json @@ -0,0 +1,56 @@ +// For more details, see https://aka.ms/devcontainer.json. +{ + "name": "PayPal Standard Integration - HTML + Java", + "image": "mcr.microsoft.com/devcontainers/java:21", + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", + // Use 'onCreateCommand' to run commands when creating the container. + "onCreateCommand": "bash .devcontainer/standard-integration-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 Standard 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": "standard-integration" + }, + "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" + } + } +} \ No newline at end of file diff --git a/.devcontainer/standard-integration-html-java/welcome-message.sh b/.devcontainer/standard-integration-html-java/welcome-message.sh new file mode 100644 index 00000000..78cce216 --- /dev/null +++ b/.devcontainer/standard-integration-html-java/welcome-message.sh @@ -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" diff --git a/.devcontainer/standard-integration-html-node/devcontainer.json b/.devcontainer/standard-integration-html-node/devcontainer.json new file mode 100644 index 00000000..cc5c735c --- /dev/null +++ b/.devcontainer/standard-integration-html-node/devcontainer.json @@ -0,0 +1,55 @@ +// For more details, see https://aka.ms/devcontainer.json. +{ + "name": "PayPal Standard Integration - 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/standard-integration-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 Standard 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": "standard-integration" + }, + "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" + } + } +} diff --git a/.devcontainer/standard-integration-html-node/welcome-message.sh b/.devcontainer/standard-integration-html-node/welcome-message.sh new file mode 100644 index 00000000..78cce216 --- /dev/null +++ b/.devcontainer/standard-integration-html-node/welcome-message.sh @@ -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" diff --git a/.devcontainer/standard-integration-html-php/devcontainer.json b/.devcontainer/standard-integration-html-php/devcontainer.json new file mode 100644 index 00000000..0eb9ea3b --- /dev/null +++ b/.devcontainer/standard-integration-html-php/devcontainer.json @@ -0,0 +1,55 @@ +// For more details, see https://aka.ms/devcontainer.json. +{ + "name": "PayPal Standard Integration - HTML + PHP", + "image": "mcr.microsoft.com/devcontainers/php:8", + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", + // Use 'onCreateCommand' to run commands when creating the container. + "onCreateCommand": "bash .devcontainer/standard-integration-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 Standard 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": "standard-integration" + }, + "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" + } + } +} \ No newline at end of file diff --git a/.devcontainer/standard-integration-html-php/welcome-message.sh b/.devcontainer/standard-integration-html-php/welcome-message.sh new file mode 100644 index 00000000..78cce216 --- /dev/null +++ b/.devcontainer/standard-integration-html-php/welcome-message.sh @@ -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" diff --git a/.devcontainer/standard-integration-react-dotnet/devcontainer.json b/.devcontainer/standard-integration-react-dotnet/devcontainer.json new file mode 100644 index 00000000..face336b --- /dev/null +++ b/.devcontainer/standard-integration-react-dotnet/devcontainer.json @@ -0,0 +1,55 @@ +// For more details, see https://aka.ms/devcontainer.json. +{ + "name": "PayPal Standard Integration - React + Dotnet", + "image": "mcr.microsoft.com/devcontainers/dotnet:8.0", + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", + // Use 'onCreateCommand' to run commands when creating the container. + "onCreateCommand": "bash .devcontainer/standard-integration-react-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 Standard Checkout Flow" + }, + "3000": { + "label": "React", + "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": "react", + "VISIBLE_FOLDER_PROJECT": "standard-integration" + }, + "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" + } + } +} diff --git a/.devcontainer/standard-integration-react-dotnet/welcome-message.sh b/.devcontainer/standard-integration-react-dotnet/welcome-message.sh new file mode 100644 index 00000000..78cce216 --- /dev/null +++ b/.devcontainer/standard-integration-react-dotnet/welcome-message.sh @@ -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" diff --git a/.devcontainer/standard-integration-react-java/devcontainer.json b/.devcontainer/standard-integration-react-java/devcontainer.json new file mode 100644 index 00000000..69df286d --- /dev/null +++ b/.devcontainer/standard-integration-react-java/devcontainer.json @@ -0,0 +1,56 @@ +// For more details, see https://aka.ms/devcontainer.json. +{ + "name": "PayPal Standard Integration - React + Java", + "image": "mcr.microsoft.com/devcontainers/java:21", + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", + // Use 'onCreateCommand' to run commands when creating the container. + "onCreateCommand": "bash .devcontainer/standard-integration-react-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 Standard Checkout Flow" + }, + "3000": { + "label": "React", + "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": "react", + "VISIBLE_FOLDER_PROJECT": "standard-integration" + }, + "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" + } + } +} \ No newline at end of file diff --git a/.devcontainer/standard-integration-react-java/welcome-message.sh b/.devcontainer/standard-integration-react-java/welcome-message.sh new file mode 100644 index 00000000..78cce216 --- /dev/null +++ b/.devcontainer/standard-integration-react-java/welcome-message.sh @@ -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" diff --git a/.devcontainer/standard-integration-react-node/devcontainer.json b/.devcontainer/standard-integration-react-node/devcontainer.json new file mode 100644 index 00000000..f2bee56f --- /dev/null +++ b/.devcontainer/standard-integration-react-node/devcontainer.json @@ -0,0 +1,55 @@ +// For more details, see https://aka.ms/devcontainer.json. +{ + "name": "PayPal Standard Integration - React + Node", + "image": "mcr.microsoft.com/devcontainers/javascript-node:20", + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", + // Use 'onCreateCommand' to run commands when creating the container. + "onCreateCommand": "bash .devcontainer/standard-integration-react-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 Standard Checkout Flow" + }, + "3000": { + "label": "React", + "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": "react", + "VISIBLE_FOLDER_PROJECT": "standard-integration" + }, + "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" + } + } +} diff --git a/.devcontainer/standard-integration-react-node/welcome-message.sh b/.devcontainer/standard-integration-react-node/welcome-message.sh new file mode 100644 index 00000000..78cce216 --- /dev/null +++ b/.devcontainer/standard-integration-react-node/welcome-message.sh @@ -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" diff --git a/.devcontainer/standard-integration-react-php/devcontainer.json b/.devcontainer/standard-integration-react-php/devcontainer.json new file mode 100644 index 00000000..ca2a55bf --- /dev/null +++ b/.devcontainer/standard-integration-react-php/devcontainer.json @@ -0,0 +1,55 @@ +// For more details, see https://aka.ms/devcontainer.json. +{ + "name": "PayPal Standard Integration - React + PHP", + "image": "mcr.microsoft.com/devcontainers/php:8", + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", + // Use 'onCreateCommand' to run commands when creating the container. + "onCreateCommand": "bash .devcontainer/standard-integration-react-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 Standard Checkout Flow" + }, + "3000": { + "label": "React", + "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": "react", + "VISIBLE_FOLDER_PROJECT": "standard-integration" + }, + "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" + } + } +} \ No newline at end of file diff --git a/.devcontainer/standard-integration-react-php/welcome-message.sh b/.devcontainer/standard-integration-react-php/welcome-message.sh new file mode 100644 index 00000000..78cce216 --- /dev/null +++ b/.devcontainer/standard-integration-react-php/welcome-message.sh @@ -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" diff --git a/.devcontainer/update_settings.sh b/.devcontainer/update_settings.sh new file mode 100755 index 00000000..736b30ff --- /dev/null +++ b/.devcontainer/update_settings.sh @@ -0,0 +1,140 @@ +#!/bin/bash + +set -e + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +WORKSPACE_DIR="$( cd "$SCRIPT_DIR/.." &> /dev/null && pwd )" + +VISIBLE_FOLDER_SERVER="$VISIBLE_FOLDER_SERVER" +VISIBLE_FOLDER_CLIENT="$VISIBLE_FOLDER_CLIENT" +VISIBLE_FOLDER_PROJECT="$VISIBLE_FOLDER_PROJECT" +VISIBLE_FOLDER_VERSION="$VISIBLE_FOLDER_VERSION" + +DEVCONTAINER_WORKSPACE="$WORKSPACE_DIR/.devcontainer" +SETTINGS_FILE="$WORKSPACE_DIR/.vscode/settings.json" +PROJECT_WORKSPACE="$WORKSPACE_DIR/$VISIBLE_FOLDER_PROJECT" + + +if [ -z "$VISIBLE_FOLDER_CLIENT" ]; then + echo "Error: VISIBLE_FOLDER_CLIENT is not set, setting it to default" + VISIBLE_FOLDER_CLIENT="DEFAULT" +fi + +if [ -z "$VISIBLE_FOLDER_VERSION" ]; then + SERVER_WORKSPACE="$WORKSPACE_DIR/$VISIBLE_FOLDER_PROJECT/server" + CLIENT_WORKSPACE="$WORKSPACE_DIR/$VISIBLE_FOLDER_PROJECT/client" + VERSION_WORKSPACE="$PROJECT_WORKSPACE" + VISIBLE_FOLDER_DEVCONTAINER="$VISIBLE_FOLDER_PROJECT-$VISIBLE_FOLDER_CLIENT-$VISIBLE_FOLDER_SERVER" + PROJECT_DIR="$VISIBLE_FOLDER_PROJECT" +else + SERVER_WORKSPACE="$WORKSPACE_DIR/$VISIBLE_FOLDER_PROJECT/$VISIBLE_FOLDER_VERSION/server" + CLIENT_WORKSPACE="$WORKSPACE_DIR/$VISIBLE_FOLDER_PROJECT/$VISIBLE_FOLDER_VERSION/client" + VERSION_WORKSPACE="$PROJECT_WORKSPACE/$VISIBLE_FOLDER_VERSION" + VISIBLE_FOLDER_DEVCONTAINER="$VISIBLE_FOLDER_PROJECT-$VISIBLE_FOLDER_VERSION-$VISIBLE_FOLDER_CLIENT-$VISIBLE_FOLDER_SERVER" + PROJECT_DIR="$VISIBLE_FOLDER_PROJECT/$VISIBLE_FOLDER_VERSION" + +fi +echo "SERVER_WORKSPACE:$SERVER_WORKSPACE" +echo "CLIENT_WORKSPACE:$CLIENT_WORKSPACE" +echo "VISIBLE_FOLDER_DEVCONTAINER:$VISIBLE_FOLDER_DEVCONTAINER" +echo "PROJECT_WORKSPACE:$PROJECT_WORKSPACE" + + +echo "Workspace directory: $WORKSPACE_DIR" +echo "Server directory: $SERVER_WORKSPACE" +echo "Visible server folder: $VISIBLE_FOLDER_SERVER" +echo "Visible client folder: $VISIBLE_FOLDER_CLIENT" +echo "Visible project folder: $VISIBLE_FOLDER_PROJECT" +echo "Visible version: $VISIBLE_FOLDER_VERSION" +echo "Visible devcontainer: $DEVCONTAINER_WORKSPACE" +if [ ! -d "$SERVER_WORKSPACE" ]; then + echo "Error: Server directory not found at $SERVER_WORKSPACE" + exit 1 +fi + +if [ ! -d "$DEVCONTAINER_WORKSPACE" ]; then + echo "Error: .devcontainer directory not found at $DEVCONTAINER_WORKSPACE" + exit 1 +fi + +if [ -z "$VISIBLE_FOLDER_SERVER" ]; then + echo "Error: VISIBLE_FOLDER_SERVER is not set" + exit 1 +fi + +mkdir -p "$(dirname "$SETTINGS_FILE")" + +echo "{ + \"files.exclude\": {" > "$SETTINGS_FILE" + +first=true + +for dir in "$WORKSPACE_DIR"/*/ ; do + dir_name=$(basename "$dir") + if [ -d "$dir" ] && [ "$dir_name" != "$VISIBLE_FOLDER_PROJECT" ]; then + if [ "$first" = true ] ; then + first=false + else + echo "," >> "$SETTINGS_FILE" + fi + echo -n " \"**/$dir_name\": true" >> "$SETTINGS_FILE" + fi +done + +if [ -n "$VISIBLE_FOLDER_VERSION" ]; then + for dir in "$PROJECT_WORKSPACE"/*/ ; do + dir_name=$(basename "$dir") + if [ -d "$dir" ] && [ "$dir_name" != "$VISIBLE_FOLDER_VERSION" ]; then + if [ "$first" = true ] ; then + first=false + else + echo "," >> "$SETTINGS_FILE" + fi + echo -n " \"**/$VISIBLE_FOLDER_PROJECT/$dir_name\": true" >> "$SETTINGS_FILE" + fi + done +fi + +for dir in "$DEVCONTAINER_WORKSPACE"/*/ ; do + dir_name=$(basename "$dir") + if [ -d "$dir" ] && [ "$dir_name" != "$VISIBLE_FOLDER_DEVCONTAINER" ]; then + if [ "$first" = true ] ; then + first=false + else + echo "," >> "$SETTINGS_FILE" + fi + echo -n " \"**/.devcontainer/$dir_name\": true" >> "$SETTINGS_FILE" + fi +done + +for dir in "$SERVER_WORKSPACE"/*/ ; do + dir_name=$(basename "$dir") + if [ -d "$dir" ] && [ "$dir_name" != "$VISIBLE_FOLDER_SERVER" ]; then + if [ "$first" = true ] ; then + first=false + else + echo "," >> "$SETTINGS_FILE" + fi + echo -n " \"**/$PROJECT_DIR/server/$dir_name\": true" >> "$SETTINGS_FILE" + fi +done + +for dir in "$CLIENT_WORKSPACE"/*/ ; do + dir_name=$(basename "$dir") + if [ -d "$dir" ] && [ "$dir_name" != "$VISIBLE_FOLDER_CLIENT" ]; then + if [ "$first" = true ] ; then + first=false + else + echo "," >> "$SETTINGS_FILE" + fi + echo -n " \"**/$PROJECT_DIR/client/$dir_name\": true" >> "$SETTINGS_FILE" + fi +done + +echo " + } +}" >> "$SETTINGS_FILE" + +echo "VS Code settings updated to show only $VISIBLE_FOLDER_SERVER and $VISIBLE_FOLDER_CLIENT folder in server directory." +echo "Contents of $SETTINGS_FILE:" +cat "$SETTINGS_FILE" \ No newline at end of file diff --git a/.gitignore b/.gitignore index 5df6b051..b5925b9d 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,7 @@ dist # dotnet *.sln + +#Codespace +.vscode/settings.json +.devcontainer/update_settings.sh \ No newline at end of file From 1429c63ab9dbb3e5ea1dde50b4db0b1e827d7a65 Mon Sep 17 00:00:00 2001 From: Louis Low Date: Thu, 19 Sep 2024 00:57:59 +0800 Subject: [PATCH 02/18] add steps to run codespace in README.md --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index daf0636c..98fbede3 100644 --- a/README.md +++ b/README.md @@ -41,9 +41,18 @@ These examples will ask you to run commands like `npm install` and `npm start`. You'll need a version of node >= 16 which can be downloaded from the [Node.js website](https://nodejs.org/en/download/). -## PayPal Codespaces +# Running on Codespaces +Follow below steps to use Codespaces. + +1) Click "New with options..." to open a page where you can choose the Dev container to run. +![image](https://github.com/user-attachments/assets/0d4bf202-0c94-42ec-aa2e-d8ccb6da9eb8) + +2) Choose the Dev container to run +![image](https://github.com/user-attachments/assets/b612467d-9fdc-4666-8dfa-0d99af6a2d39) + +3) Client ID and Client Secrets are required for running the application in codespace. +![image](https://github.com/user-attachments/assets/cbbc4521-aa43-403f-9243-e3c555e67f4a) -PayPal codespaces require a client ID and client secret for your app. ### Link to codespaces From b1aa4c83bfc2464926a142260a61d3d2090593b4 Mon Sep 17 00:00:00 2001 From: Louis Low Date: Thu, 19 Sep 2024 00:58:05 +0800 Subject: [PATCH 03/18] change name of devcontainers --- .../advanced-integration-v2-html-dotnet/devcontainer.json | 2 +- .../advanced-integration-v2-html-java/devcontainer.json | 2 +- .../advanced-integration-v2-html-node/devcontainer.json | 2 +- .../advanced-integration-v2-html-php/devcontainer.json | 2 +- .../advanced-integration-v2-react-dotnet/devcontainer.json | 2 +- .../advanced-integration-v2-react-java/devcontainer.json | 2 +- .../advanced-integration-v2-react-node/devcontainer.json | 2 +- .../advanced-integration-v2-react-php/devcontainer.json | 2 +- .../standard-integration-html-dotnet/devcontainer.json | 2 +- .devcontainer/standard-integration-html-java/devcontainer.json | 2 +- .devcontainer/standard-integration-html-node/devcontainer.json | 2 +- .devcontainer/standard-integration-html-php/devcontainer.json | 2 +- .../standard-integration-react-dotnet/devcontainer.json | 2 +- .devcontainer/standard-integration-react-java/devcontainer.json | 2 +- .devcontainer/standard-integration-react-node/devcontainer.json | 2 +- .devcontainer/standard-integration-react-php/devcontainer.json | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.devcontainer/advanced-integration-v2-html-dotnet/devcontainer.json b/.devcontainer/advanced-integration-v2-html-dotnet/devcontainer.json index 88c465f9..d04cf42b 100644 --- a/.devcontainer/advanced-integration-v2-html-dotnet/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-html-dotnet/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "PayPal Advanced Integration (v2) - HTML + Dotnet", + "name": "advanced-integration/client-html/server-dotnet", "image": "mcr.microsoft.com/devcontainers/dotnet:8.0", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/advanced-integration-v2-html-java/devcontainer.json b/.devcontainer/advanced-integration-v2-html-java/devcontainer.json index 1d395202..16915c08 100644 --- a/.devcontainer/advanced-integration-v2-html-java/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-html-java/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "PayPal Advanced Integration (v2) - HTML + Java", + "name": "advanced-integration/client-html/server-java", "image": "mcr.microsoft.com/devcontainers/java:21", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/advanced-integration-v2-html-node/devcontainer.json b/.devcontainer/advanced-integration-v2-html-node/devcontainer.json index a4f48d9f..efade83b 100644 --- a/.devcontainer/advanced-integration-v2-html-node/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-html-node/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "PayPal Advanced Integration (v2) - HTML + Node", + "name": "advanced-integration/client-html/server-node", "image": "mcr.microsoft.com/devcontainers/javascript-node:20", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/advanced-integration-v2-html-php/devcontainer.json b/.devcontainer/advanced-integration-v2-html-php/devcontainer.json index 72c8222f..477a6b79 100644 --- a/.devcontainer/advanced-integration-v2-html-php/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-html-php/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "PayPal Advanced Integration (v2) - HTML + PHP", + "name": "advanced-integration/client-html/server-php", "image": "mcr.microsoft.com/devcontainers/php:8", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/advanced-integration-v2-react-dotnet/devcontainer.json b/.devcontainer/advanced-integration-v2-react-dotnet/devcontainer.json index 6728053f..f26a59f1 100644 --- a/.devcontainer/advanced-integration-v2-react-dotnet/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-react-dotnet/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "PayPal Advanced Integration (v2) - React + Dotnet", + "name": " advanced-integration/client-react/server-dotnet", "image": "mcr.microsoft.com/devcontainers/dotnet:8.0", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/advanced-integration-v2-react-java/devcontainer.json b/.devcontainer/advanced-integration-v2-react-java/devcontainer.json index 5652a550..f0f9b3b7 100644 --- a/.devcontainer/advanced-integration-v2-react-java/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-react-java/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "PayPal Advanced Integration (v2) - React + Java", + "name": "advanced-integration/client-react/server-java", "image": "mcr.microsoft.com/devcontainers/java:21", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/advanced-integration-v2-react-node/devcontainer.json b/.devcontainer/advanced-integration-v2-react-node/devcontainer.json index 6ac4eb0f..c8a98975 100644 --- a/.devcontainer/advanced-integration-v2-react-node/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-react-node/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "PayPal Advanced Integration (v2) - React + Node", + "name": "advanced-integration/client-react/server-node", "image": "mcr.microsoft.com/devcontainers/javascript-node:20", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/advanced-integration-v2-react-php/devcontainer.json b/.devcontainer/advanced-integration-v2-react-php/devcontainer.json index c31367fe..34a91fb0 100644 --- a/.devcontainer/advanced-integration-v2-react-php/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-react-php/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "PayPal Advanced Integration (v2) - React + PHP", + "name": "advanced-integration/client-react/server-php", "image": "mcr.microsoft.com/devcontainers/php:8", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/standard-integration-html-dotnet/devcontainer.json b/.devcontainer/standard-integration-html-dotnet/devcontainer.json index c97cbb18..cfda05fb 100644 --- a/.devcontainer/standard-integration-html-dotnet/devcontainer.json +++ b/.devcontainer/standard-integration-html-dotnet/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "PayPal Standard Integration - HTML + Dotnet", + "name": "standard-integration/client-html/server-dotnet", "image": "mcr.microsoft.com/devcontainers/dotnet:8.0", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/standard-integration-html-java/devcontainer.json b/.devcontainer/standard-integration-html-java/devcontainer.json index ae903e74..84a59669 100644 --- a/.devcontainer/standard-integration-html-java/devcontainer.json +++ b/.devcontainer/standard-integration-html-java/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "PayPal Standard Integration - HTML + Java", + "name": "standard-integration/client-html/server-java", "image": "mcr.microsoft.com/devcontainers/java:21", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/standard-integration-html-node/devcontainer.json b/.devcontainer/standard-integration-html-node/devcontainer.json index cc5c735c..2fc7df6d 100644 --- a/.devcontainer/standard-integration-html-node/devcontainer.json +++ b/.devcontainer/standard-integration-html-node/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "PayPal Standard Integration - HTML + Node", + "name": "standard-integration/client-html/server-node", "image": "mcr.microsoft.com/devcontainers/javascript-node:20", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/standard-integration-html-php/devcontainer.json b/.devcontainer/standard-integration-html-php/devcontainer.json index 0eb9ea3b..8e219203 100644 --- a/.devcontainer/standard-integration-html-php/devcontainer.json +++ b/.devcontainer/standard-integration-html-php/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "PayPal Standard Integration - HTML + PHP", + "name": "standard-integration/client-html/server-php", "image": "mcr.microsoft.com/devcontainers/php:8", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/standard-integration-react-dotnet/devcontainer.json b/.devcontainer/standard-integration-react-dotnet/devcontainer.json index face336b..919d294f 100644 --- a/.devcontainer/standard-integration-react-dotnet/devcontainer.json +++ b/.devcontainer/standard-integration-react-dotnet/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "PayPal Standard Integration - React + Dotnet", + "name": "standard-integration/client-react/server-dotnet", "image": "mcr.microsoft.com/devcontainers/dotnet:8.0", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/standard-integration-react-java/devcontainer.json b/.devcontainer/standard-integration-react-java/devcontainer.json index 69df286d..5cdb28f2 100644 --- a/.devcontainer/standard-integration-react-java/devcontainer.json +++ b/.devcontainer/standard-integration-react-java/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "PayPal Standard Integration - React + Java", + "name": "standard-integration/client-react/server-java", "image": "mcr.microsoft.com/devcontainers/java:21", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/standard-integration-react-node/devcontainer.json b/.devcontainer/standard-integration-react-node/devcontainer.json index f2bee56f..61e5d68c 100644 --- a/.devcontainer/standard-integration-react-node/devcontainer.json +++ b/.devcontainer/standard-integration-react-node/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "PayPal Standard Integration - React + Node", + "name": "standard-integration/client-react/server-node", "image": "mcr.microsoft.com/devcontainers/javascript-node:20", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/standard-integration-react-php/devcontainer.json b/.devcontainer/standard-integration-react-php/devcontainer.json index ca2a55bf..e0af4870 100644 --- a/.devcontainer/standard-integration-react-php/devcontainer.json +++ b/.devcontainer/standard-integration-react-php/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "PayPal Standard Integration - React + PHP", + "name": "standard-integration/client-react/server-php", "image": "mcr.microsoft.com/devcontainers/php:8", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. From 62a9fbe2256a5a37105de3e8a913c0d1dab2e866 Mon Sep 17 00:00:00 2001 From: Sourav Sarkar Date: Thu, 19 Sep 2024 15:37:41 +0530 Subject: [PATCH 04/18] feat: fetch paypal_client_id and paypal_client_secret from env --- .gitignore | 2 ++ advanced-integration/v2/client/html/README.md | 6 ++-- .../v2/client/react/README.md | 6 ++-- .../v2/server/dotnet/README.md | 35 ++++++++++++++----- .../v2/server/dotnet/Server.cs | 10 ++---- .../v2/server/dotnet/appsettings.json | 4 --- advanced-integration/v2/server/java/README.md | 35 ++++++++++++++----- advanced-integration/v2/server/java/pom.xml | 2 +- .../src/main/resources/application.properties | 4 +-- advanced-integration/v2/server/node/README.md | 34 +++++++++++++----- advanced-integration/v2/server/php/README.md | 20 +++++++++-- .../v2/server/php/server/.env | 2 -- .../v2/server/php/server/index.php | 31 ++++++++-------- standard-integration/client/html/README.md | 6 ++-- standard-integration/client/react/README.md | 6 ++-- standard-integration/server/dotnet/README.md | 35 ++++++++++++++----- standard-integration/server/dotnet/Server.cs | 10 ++---- .../server/dotnet/appsettings.json | 4 --- standard-integration/server/java/README.md | 35 ++++++++++++++----- standard-integration/server/java/pom.xml | 2 +- .../src/main/resources/application.properties | 4 +-- standard-integration/server/node/README.md | 34 +++++++++++++----- standard-integration/server/php/README.md | 20 +++++++++-- standard-integration/server/php/server/.env | 2 -- .../server/php/server/index.php | 31 ++++++++-------- 25 files changed, 244 insertions(+), 136 deletions(-) delete mode 100644 advanced-integration/v2/server/dotnet/appsettings.json delete mode 100644 advanced-integration/v2/server/php/server/.env delete mode 100644 standard-integration/server/dotnet/appsettings.json delete mode 100644 standard-integration/server/php/server/.env diff --git a/.gitignore b/.gitignore index 5df6b051..2caf82db 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,5 @@ dist # dotnet *.sln + +*.local diff --git a/advanced-integration/v2/client/html/README.md b/advanced-integration/v2/client/html/README.md index 0ebb16ac..a98bb13f 100644 --- a/advanced-integration/v2/client/html/README.md +++ b/advanced-integration/v2/client/html/README.md @@ -20,7 +20,7 @@ This guide will walk you through setting up and running the HTML/JS Advanced Int ### Installation -```sh +```bash npm install ``` @@ -31,7 +31,7 @@ npm install - Rename the .env.example file to .env - Update the following keys with their actual values - - ```sh + ```bash PAYPAL_CLIENT_ID= ``` @@ -61,7 +61,7 @@ npm install - **Start the client**: - ```sh + ```bash npm run dev ``` diff --git a/advanced-integration/v2/client/react/README.md b/advanced-integration/v2/client/react/README.md index 6022519f..70f5f11e 100644 --- a/advanced-integration/v2/client/react/README.md +++ b/advanced-integration/v2/client/react/README.md @@ -20,7 +20,7 @@ This guide will walk you through setting up and running the React Advanced Integ ### Installation -```sh +```bash npm install ``` @@ -31,7 +31,7 @@ npm install - Rename the .env.example file to .env - Update the following keys with their actual values - - ```sh + ```bash PAYPAL_CLIENT_ID= ``` @@ -61,7 +61,7 @@ npm install - **Start the client**: - ```sh + ```bash npm run dev ``` diff --git a/advanced-integration/v2/server/dotnet/README.md b/advanced-integration/v2/server/dotnet/README.md index 92ac1cc2..52ed7c55 100644 --- a/advanced-integration/v2/server/dotnet/README.md +++ b/advanced-integration/v2/server/dotnet/README.md @@ -1,18 +1,35 @@ # Advanced Integartion .NET Sample + PayPal Advanced Integration sample in .NET ## Running the sample -1. Build the server +1. **Add your API credentials to the environment:** + + - **Windows** + + ```powershell + $env:PAYPAL_CLIENT_ID = "" + $env:PAYPAL_CLIENT_SECRET = "" + ``` + + - **Unix** + + ```bash + export PAYPAL_CLIENT_ID="" + export PAYPAL_CLIENT_SECRET="" + ``` + +2. **Build the server** -~~~ -dotnet restore -~~~ + ```bash + dotnet restore + ``` -2. Run the server +3. **Run the server** -~~~ -dotnet run -~~~ + ```bash + dotnet run + ``` -3. Go to [http://localhost:8080/](http://localhost:8080/) \ No newline at end of file +4. Go to [http://localhost:8080/](http://localhost:8080/) diff --git a/advanced-integration/v2/server/dotnet/Server.cs b/advanced-integration/v2/server/dotnet/Server.cs index c9bab8fc..dcd334fb 100644 --- a/advanced-integration/v2/server/dotnet/Server.cs +++ b/advanced-integration/v2/server/dotnet/Server.cs @@ -23,12 +23,6 @@ public static void Main(string[] args) public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) - .ConfigureAppConfiguration( - (context, config) => - { - config.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true); - } - ) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseUrls("http://localhost:8080"); @@ -66,11 +60,11 @@ public class CheckoutController : Controller private IConfiguration _configuration { get; } private string _paypalClientId { - get { return _configuration["PAYPAL_CLIENT_ID"]; } + get { return Environment.GetEnvironmentVariable("PAYPAL_CLIENT_ID"); } } private string _paypalClientSecret { - get { return _configuration["PAYPAL_CLIENT_SECRET"]; } + get { return Environment.GetEnvironmentVariable("PAYPAL_CLIENT_SECRET"); } } private readonly string _base = "https://api-m.sandbox.paypal.com"; diff --git a/advanced-integration/v2/server/dotnet/appsettings.json b/advanced-integration/v2/server/dotnet/appsettings.json deleted file mode 100644 index 019194eb..00000000 --- a/advanced-integration/v2/server/dotnet/appsettings.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "PAYPAL_CLIENT_ID": "PAYPAL_CLIENT_ID", - "PAYPAL_CLIENT_SECRET": "PAYPAL_CLIENT_SECRET" -} diff --git a/advanced-integration/v2/server/java/README.md b/advanced-integration/v2/server/java/README.md index 578fb9b7..8e330262 100644 --- a/advanced-integration/v2/server/java/README.md +++ b/advanced-integration/v2/server/java/README.md @@ -1,18 +1,35 @@ # Advanced Integartion Java Sample + PayPal Advanced Integration sample in Java ## Running the sample -1. Build the server +1. Add your API credentials to the environment: + + - **Windows** + + ```powershell + $env:PAYPAL_CLIENT_ID = "" + $env:PAYPAL_CLIENT_SECRET = "" + ``` + + - **Unix** + + ```bash + export PAYPAL_CLIENT_ID="" + export PAYPAL_CLIENT_SECRET="" + ``` + +2. Build the server -~~~ -mvn clean install -~~~ + ```bash + mvn clean install + ``` -2. Run the server +3. Run the server -~~~ -mvn spring-boot:run -~~~ + ```bash + mvn spring-boot:run + ``` -3. Go to [http://localhost:8080/](http://localhost:8080/) +4. Go to [http://localhost:8080/](http://localhost:8080/) diff --git a/advanced-integration/v2/server/java/pom.xml b/advanced-integration/v2/server/java/pom.xml index f36d390d..a8c8f8f9 100644 --- a/advanced-integration/v2/server/java/pom.xml +++ b/advanced-integration/v2/server/java/pom.xml @@ -27,7 +27,7 @@ - 22 + 21 diff --git a/advanced-integration/v2/server/java/src/main/resources/application.properties b/advanced-integration/v2/server/java/src/main/resources/application.properties index 88089970..103551b3 100644 --- a/advanced-integration/v2/server/java/src/main/resources/application.properties +++ b/advanced-integration/v2/server/java/src/main/resources/application.properties @@ -1,3 +1,3 @@ spring.application.name=v2-java -PAYPAL_CLIENT_ID= -PAYPAL_CLIENT_SECRET= +PAYPAL_CLIENT_ID=${PAYPAL_CLIENT_ID} +PAYPAL_CLIENT_SECRET=${PAYPAL_CLIENT_SECRET} diff --git a/advanced-integration/v2/server/node/README.md b/advanced-integration/v2/server/node/README.md index 8a3c0250..2a224db8 100644 --- a/advanced-integration/v2/server/node/README.md +++ b/advanced-integration/v2/server/node/README.md @@ -4,16 +4,32 @@ PayPal Advanced Integration sample in Node.js ## Running the sample -1. Install the packages +1. Add your API credentials to the environment: - ```sh - npm install - ``` + - **Windows** -2. Run the server + ```powershell + $env:PAYPAL_CLIENT_ID = "" + $env:PAYPAL_CLIENT_SECRET = "" + ``` - ```sh - npm run start - ``` + - **Unix** -3. Go to [http://localhost:8080/](http://localhost:8080/) + ```bash + export PAYPAL_CLIENT_ID="" + export PAYPAL_CLIENT_SECRET="" + ``` + +2. Install the packages + + ```bash + npm install + ``` + +3. Run the server + + ```bash + npm run start + ``` + +4. Go to [http://localhost:8080/](http://localhost:8080/) diff --git a/advanced-integration/v2/server/php/README.md b/advanced-integration/v2/server/php/README.md index 2f162d42..a789b6bf 100644 --- a/advanced-integration/v2/server/php/README.md +++ b/advanced-integration/v2/server/php/README.md @@ -18,9 +18,23 @@ This sample app demonstrates how to integrate with ACDC using PayPal's REST APIs ## How to Run Locally -1. Replace your Client ID & Client Secret in the server/.env file: -2. Open the `.env` file in a text editor and replace the placeholders with the appropriate values. -3. Follow the below instructions to setup & run server. +1. Add your API credentials to the environment: + + - **Windows** + + ```powershell + $env:PAYPAL_CLIENT_ID = "" + $env:PAYPAL_CLIENT_SECRET = "" + ``` + + - **Unix** + + ```bash + export PAYPAL_CLIENT_ID="" + export PAYPAL_CLIENT_SECRET="" + ``` + +2. Follow the below instructions to setup & run server. ## Install the Composer diff --git a/advanced-integration/v2/server/php/server/.env b/advanced-integration/v2/server/php/server/.env deleted file mode 100644 index 96d3bc76..00000000 --- a/advanced-integration/v2/server/php/server/.env +++ /dev/null @@ -1,2 +0,0 @@ -PAYPAL_CLIENT_ID= -PAYPAL_CLIENT_SECRET= \ No newline at end of file diff --git a/advanced-integration/v2/server/php/server/index.php b/advanced-integration/v2/server/php/server/index.php index 81a25ada..e99a2841 100644 --- a/advanced-integration/v2/server/php/server/index.php +++ b/advanced-integration/v2/server/php/server/index.php @@ -3,17 +3,16 @@ use GuzzleHttp\Client; -$env = parse_ini_file('.env'); - -$PAYPAL_CLIENT_ID = $env['PAYPAL_CLIENT_ID']; -$PAYPAL_CLIENT_SECRET = $env['PAYPAL_CLIENT_SECRET']; +$PAYPAL_CLIENT_ID = getenv('PAYPAL_CLIENT_ID'); +$PAYPAL_CLIENT_SECRET = getenv('PAYPAL_CLIENT_SECRET'); $base = "https://api-m.sandbox.paypal.com"; /** * Generate an OAuth 2.0 access token for authenticating with PayPal REST APIs. * @see https://developer.paypal.com/api/rest/authentication/ */ -function generateAccessToken() { +function generateAccessToken() +{ global $PAYPAL_CLIENT_ID, $PAYPAL_CLIENT_SECRET, $base; if (!$PAYPAL_CLIENT_ID || !$PAYPAL_CLIENT_SECRET) { @@ -21,7 +20,7 @@ function generateAccessToken() { } $auth = base64_encode($PAYPAL_CLIENT_ID . ":" . $PAYPAL_CLIENT_SECRET); - + // Disabling certificate validation for local development $client = new Client(['verify' => false]); $response = $client->post("$base/v1/oauth2/token", [ @@ -41,11 +40,12 @@ function generateAccessToken() { * Create an order to start the transaction. * @see https://developer.paypal.com/docs/api/orders/v2/#orders_create */ -function createOrder($cart) { +function createOrder($cart) +{ global $base; $accessToken = generateAccessToken(); - + // Disabling certificate validation for local development $client = new Client(['verify' => false]); $payload = [ @@ -75,7 +75,8 @@ function createOrder($cart) { * Capture payment for the created order to complete the transaction. * @see https://developer.paypal.com/docs/api/orders/v2/#orders_capture */ -function captureOrder($orderID) { +function captureOrder($orderID) +{ global $base; $accessToken = generateAccessToken(); @@ -92,7 +93,8 @@ function captureOrder($orderID) { return handleResponse($response); } -function handleResponse($response) { +function handleResponse($response) +{ $jsonResponse = json_decode($response->getBody(), true); return [ 'jsonResponse' => $jsonResponse, @@ -101,7 +103,7 @@ function handleResponse($response) { } $endpoint = $_SERVER['REQUEST_URI']; -if($endpoint === '/') { +if ($endpoint === '/') { try { $response = [ "message" => "Server is running" @@ -114,7 +116,7 @@ function handleResponse($response) { } } -if($endpoint === '/api/orders') { +if ($endpoint === '/api/orders') { $data = json_decode(file_get_contents('php://input'), true); $cart = $data['cart']; header('Content-Type: application/json'); @@ -128,7 +130,7 @@ function handleResponse($response) { } -if(str_ends_with($endpoint, '/capture')) { +if (str_ends_with($endpoint, '/capture')) { $urlSegments = explode('/', $endpoint); end($urlSegments); // Will set the pointer to the end of array $orderID = prev($urlSegments); @@ -140,5 +142,4 @@ function handleResponse($response) { echo json_encode(['error' => $e->getMessage()]); http_response_code(500); } -} -?> \ No newline at end of file +} \ No newline at end of file diff --git a/standard-integration/client/html/README.md b/standard-integration/client/html/README.md index 5c79b001..302fcb42 100644 --- a/standard-integration/client/html/README.md +++ b/standard-integration/client/html/README.md @@ -20,7 +20,7 @@ This guide will walk you through setting up and running the HTML/JS Standard Int ### Installation -```sh +```bash npm install ``` @@ -31,7 +31,7 @@ npm install - Rename the .env.example file to .env - Update the following keys with their actual values - - ```sh + ```bash PAYPAL_CLIENT_ID= ``` @@ -61,7 +61,7 @@ npm install - **Start the client**: - ```sh + ```bash npm run dev ``` diff --git a/standard-integration/client/react/README.md b/standard-integration/client/react/README.md index fdf7d214..da8ec278 100644 --- a/standard-integration/client/react/README.md +++ b/standard-integration/client/react/README.md @@ -20,7 +20,7 @@ This guide will walk you through setting up and running the React Standard Integ ### Installation -```sh +```bash npm install ``` @@ -31,7 +31,7 @@ npm install - Rename the .env.example file to .env - Update the following keys with their actual values - - ```sh + ```bash PAYPAL_CLIENT_ID= ``` @@ -61,7 +61,7 @@ npm install - **Start the client**: - ```sh + ```bash npm run dev ``` diff --git a/standard-integration/server/dotnet/README.md b/standard-integration/server/dotnet/README.md index 9dca45c3..d1f5fd91 100644 --- a/standard-integration/server/dotnet/README.md +++ b/standard-integration/server/dotnet/README.md @@ -1,18 +1,35 @@ # Standard Integartion .NET Sample + PayPal Standard Integration sample in .NET ## Running the sample -1. Build the server +1. **Add your API credentials to the environment:** + + - **Windows** + + ```powershell + $env:PAYPAL_CLIENT_ID = "" + $env:PAYPAL_CLIENT_SECRET = "" + ``` + + - **Unix** + + ```bash + export PAYPAL_CLIENT_ID="" + export PAYPAL_CLIENT_SECRET="" + ``` + +2. **Build the server** -~~~ -dotnet restore -~~~ + ```bash + dotnet restore + ``` -2. Run the server +3. **Run the server** -~~~ -dotnet run -~~~ + ```bash + dotnet run + ``` -3. Go to [http://localhost:8080/](http://localhost:8080/) \ No newline at end of file +4. Go to [http://localhost:8080/](http://localhost:8080/) diff --git a/standard-integration/server/dotnet/Server.cs b/standard-integration/server/dotnet/Server.cs index eb24f0e8..9be4f5e5 100644 --- a/standard-integration/server/dotnet/Server.cs +++ b/standard-integration/server/dotnet/Server.cs @@ -23,12 +23,6 @@ public static void Main(string[] args) public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) - .ConfigureAppConfiguration( - (context, config) => - { - config.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true); - } - ) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseUrls("http://localhost:8080"); @@ -66,11 +60,11 @@ public class CheckoutController : Controller private IConfiguration _configuration { get; } private string _paypalClientId { - get { return _configuration["PAYPAL_CLIENT_ID"]; } + get { return Environment.GetEnvironmentVariable("PAYPAL_CLIENT_ID"); } } private string _paypalClientSecret { - get { return _configuration["PAYPAL_CLIENT_SECRET"]; } + get { return Environment.GetEnvironmentVariable("PAYPAL_CLIENT_SECRET"); } } private readonly string _base = "https://api-m.sandbox.paypal.com"; diff --git a/standard-integration/server/dotnet/appsettings.json b/standard-integration/server/dotnet/appsettings.json deleted file mode 100644 index 019194eb..00000000 --- a/standard-integration/server/dotnet/appsettings.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "PAYPAL_CLIENT_ID": "PAYPAL_CLIENT_ID", - "PAYPAL_CLIENT_SECRET": "PAYPAL_CLIENT_SECRET" -} diff --git a/standard-integration/server/java/README.md b/standard-integration/server/java/README.md index 343200e7..a9fcce21 100644 --- a/standard-integration/server/java/README.md +++ b/standard-integration/server/java/README.md @@ -1,18 +1,35 @@ # Standard Integartion Java Sample + PayPal Standard Integration sample in Java ## Running the sample -1. Build the server +1. Add your API credentials to the environment: + + - **Windows** + + ```powershell + $env:PAYPAL_CLIENT_ID = "" + $env:PAYPAL_CLIENT_SECRET = "" + ``` + + - **Unix** + + ```bash + export PAYPAL_CLIENT_ID="" + export PAYPAL_CLIENT_SECRET="" + ``` + +2. Build the server -~~~ -mvn clean install -~~~ + ```bash + mvn clean install + ``` -2. Run the server +3. Run the server -~~~ -mvn spring-boot:run -~~~ + ```bash + mvn spring-boot:run + ``` -3. Go to [http://localhost:8080/](http://localhost:8080/) +4. Go to [http://localhost:8080/](http://localhost:8080/) diff --git a/standard-integration/server/java/pom.xml b/standard-integration/server/java/pom.xml index 48e7a01c..ab4c30bc 100644 --- a/standard-integration/server/java/pom.xml +++ b/standard-integration/server/java/pom.xml @@ -27,7 +27,7 @@ - 22 + 21 diff --git a/standard-integration/server/java/src/main/resources/application.properties b/standard-integration/server/java/src/main/resources/application.properties index 88089970..103551b3 100644 --- a/standard-integration/server/java/src/main/resources/application.properties +++ b/standard-integration/server/java/src/main/resources/application.properties @@ -1,3 +1,3 @@ spring.application.name=v2-java -PAYPAL_CLIENT_ID= -PAYPAL_CLIENT_SECRET= +PAYPAL_CLIENT_ID=${PAYPAL_CLIENT_ID} +PAYPAL_CLIENT_SECRET=${PAYPAL_CLIENT_SECRET} diff --git a/standard-integration/server/node/README.md b/standard-integration/server/node/README.md index a9ddb604..0fce05d5 100644 --- a/standard-integration/server/node/README.md +++ b/standard-integration/server/node/README.md @@ -4,16 +4,32 @@ PayPal Standard Integration sample in Node.js ## Running the sample -1. Install the packages +1. Add your API credentials to the environment: - ```sh - npm install - ``` + - **Windows** -2. Run the server + ```powershell + $env:PAYPAL_CLIENT_ID = "" + $env:PAYPAL_CLIENT_SECRET = "" + ``` - ```sh - npm run start - ``` + - **Unix** -3. Go to [http://localhost:8080/](http://localhost:8080/) + ```bash + export PAYPAL_CLIENT_ID="" + export PAYPAL_CLIENT_SECRET="" + ``` + +2. Install the packages + + ```bash + npm install + ``` + +3. Run the server + + ```bash + npm run start + ``` + +4. Go to [http://localhost:8080/](http://localhost:8080/) diff --git a/standard-integration/server/php/README.md b/standard-integration/server/php/README.md index 5c5b5ed6..53284b42 100644 --- a/standard-integration/server/php/README.md +++ b/standard-integration/server/php/README.md @@ -18,9 +18,23 @@ This sample app demonstrates how to integrate with ACDC using PayPal's REST APIs ## How to Run Locally -1. Replace your Client ID & Client Secret in the server/.env file: -2. Open the `.env` file in a text editor and replace the placeholders with the appropriate values. -3. Follow the below instructions to setup & run server. +1. Add your API credentials to the environment: + + - **Windows** + + ```powershell + $env:PAYPAL_CLIENT_ID = "" + $env:PAYPAL_CLIENT_SECRET = "" + ``` + + - **Unix** + + ```bash + export PAYPAL_CLIENT_ID="" + export PAYPAL_CLIENT_SECRET="" + ``` + +2. Follow the below instructions to setup & run server. ## Install the Composer diff --git a/standard-integration/server/php/server/.env b/standard-integration/server/php/server/.env deleted file mode 100644 index 96d3bc76..00000000 --- a/standard-integration/server/php/server/.env +++ /dev/null @@ -1,2 +0,0 @@ -PAYPAL_CLIENT_ID= -PAYPAL_CLIENT_SECRET= \ No newline at end of file diff --git a/standard-integration/server/php/server/index.php b/standard-integration/server/php/server/index.php index 81a25ada..e99a2841 100644 --- a/standard-integration/server/php/server/index.php +++ b/standard-integration/server/php/server/index.php @@ -3,17 +3,16 @@ use GuzzleHttp\Client; -$env = parse_ini_file('.env'); - -$PAYPAL_CLIENT_ID = $env['PAYPAL_CLIENT_ID']; -$PAYPAL_CLIENT_SECRET = $env['PAYPAL_CLIENT_SECRET']; +$PAYPAL_CLIENT_ID = getenv('PAYPAL_CLIENT_ID'); +$PAYPAL_CLIENT_SECRET = getenv('PAYPAL_CLIENT_SECRET'); $base = "https://api-m.sandbox.paypal.com"; /** * Generate an OAuth 2.0 access token for authenticating with PayPal REST APIs. * @see https://developer.paypal.com/api/rest/authentication/ */ -function generateAccessToken() { +function generateAccessToken() +{ global $PAYPAL_CLIENT_ID, $PAYPAL_CLIENT_SECRET, $base; if (!$PAYPAL_CLIENT_ID || !$PAYPAL_CLIENT_SECRET) { @@ -21,7 +20,7 @@ function generateAccessToken() { } $auth = base64_encode($PAYPAL_CLIENT_ID . ":" . $PAYPAL_CLIENT_SECRET); - + // Disabling certificate validation for local development $client = new Client(['verify' => false]); $response = $client->post("$base/v1/oauth2/token", [ @@ -41,11 +40,12 @@ function generateAccessToken() { * Create an order to start the transaction. * @see https://developer.paypal.com/docs/api/orders/v2/#orders_create */ -function createOrder($cart) { +function createOrder($cart) +{ global $base; $accessToken = generateAccessToken(); - + // Disabling certificate validation for local development $client = new Client(['verify' => false]); $payload = [ @@ -75,7 +75,8 @@ function createOrder($cart) { * Capture payment for the created order to complete the transaction. * @see https://developer.paypal.com/docs/api/orders/v2/#orders_capture */ -function captureOrder($orderID) { +function captureOrder($orderID) +{ global $base; $accessToken = generateAccessToken(); @@ -92,7 +93,8 @@ function captureOrder($orderID) { return handleResponse($response); } -function handleResponse($response) { +function handleResponse($response) +{ $jsonResponse = json_decode($response->getBody(), true); return [ 'jsonResponse' => $jsonResponse, @@ -101,7 +103,7 @@ function handleResponse($response) { } $endpoint = $_SERVER['REQUEST_URI']; -if($endpoint === '/') { +if ($endpoint === '/') { try { $response = [ "message" => "Server is running" @@ -114,7 +116,7 @@ function handleResponse($response) { } } -if($endpoint === '/api/orders') { +if ($endpoint === '/api/orders') { $data = json_decode(file_get_contents('php://input'), true); $cart = $data['cart']; header('Content-Type: application/json'); @@ -128,7 +130,7 @@ function handleResponse($response) { } -if(str_ends_with($endpoint, '/capture')) { +if (str_ends_with($endpoint, '/capture')) { $urlSegments = explode('/', $endpoint); end($urlSegments); // Will set the pointer to the end of array $orderID = prev($urlSegments); @@ -140,5 +142,4 @@ function handleResponse($response) { echo json_encode(['error' => $e->getMessage()]); http_response_code(500); } -} -?> \ No newline at end of file +} \ No newline at end of file From 3a2bf408f35167f0352c386c7f45aeebc237a765 Mon Sep 17 00:00:00 2001 From: Sourav Sarkar Date: Tue, 10 Sep 2024 14:25:04 +0530 Subject: [PATCH 05/18] feat: add support for php and java server sdk - update php to use server side sdk - update java to use server side sdk --- .gitignore | 2 + .../v2/server/java/.tool-versions | 1 + advanced-integration/v2/server/java/README.md | 34 +- advanced-integration/v2/server/java/pom.xml | 18 +- .../paypal/sample/SampleAppApplication.java | 133 +- .../v2/server/php/composer.json | 5 +- .../v2/server/php/composer.lock | 1134 ++++------------- .../v2/server/php/server/index.php | 116 +- 8 files changed, 385 insertions(+), 1058 deletions(-) create mode 100644 advanced-integration/v2/server/java/.tool-versions diff --git a/.gitignore b/.gitignore index 5df6b051..de7d8b22 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,5 @@ dist # dotnet *.sln + +*.local \ No newline at end of file diff --git a/advanced-integration/v2/server/java/.tool-versions b/advanced-integration/v2/server/java/.tool-versions new file mode 100644 index 00000000..edcd84e6 --- /dev/null +++ b/advanced-integration/v2/server/java/.tool-versions @@ -0,0 +1 @@ +java zulu-21.36.19 diff --git a/advanced-integration/v2/server/java/README.md b/advanced-integration/v2/server/java/README.md index 578fb9b7..b905ac57 100644 --- a/advanced-integration/v2/server/java/README.md +++ b/advanced-integration/v2/server/java/README.md @@ -1,18 +1,38 @@ # Advanced Integartion Java Sample + PayPal Advanced Integration sample in Java ## Running the sample -1. Build the server +1. Environmental Variables + + - Navigate to the file `src/main/resources/application.properties` + - Update the following keys with their actual values - + + ```sh + PAYPAL_CLIENT_ID= + PAYPAL_CLIENT_SECRET= + ``` + +2. Build the server -~~~ +``` mvn clean install -~~~ +``` -2. Run the server +3. Run the server -~~~ +``` mvn spring-boot:run -~~~ +``` + +4. Start the client + + - Navigate to one of the client folder and follow the installation steps + - Start the client + + ```sh + npm run dev + ``` -3. Go to [http://localhost:8080/](http://localhost:8080/) + This will start the development server, and you should be able to access the Advanced Checkout Page in your browser at `http://localhost:3000` (or the port specfied in the terminal output). diff --git a/advanced-integration/v2/server/java/pom.xml b/advanced-integration/v2/server/java/pom.xml index f36d390d..62ad0779 100644 --- a/advanced-integration/v2/server/java/pom.xml +++ b/advanced-integration/v2/server/java/pom.xml @@ -5,7 +5,7 @@ org.springframework.boot spring-boot-starter-parent - 3.3.2 + 3.3.3 com.paypal.sample @@ -27,16 +27,29 @@ - 22 + 21 org.springframework.boot spring-boot-starter-thymeleaf + 3.3.3 org.springframework.boot spring-boot-starter-web + 3.3.3 + + + + com.paypal.sdk + + + paypal-server-sdk + + + 0.5.1 + @@ -45,6 +58,7 @@ org.springframework.boot spring-boot-maven-plugin + 3.3.3 diff --git a/advanced-integration/v2/server/java/src/main/java/com/paypal/sample/SampleAppApplication.java b/advanced-integration/v2/server/java/src/main/java/com/paypal/sample/SampleAppApplication.java index b4f3b4ae..f34fef3a 100644 --- a/advanced-integration/v2/server/java/src/main/java/com/paypal/sample/SampleAppApplication.java +++ b/advanced-integration/v2/server/java/src/main/java/com/paypal/sample/SampleAppApplication.java @@ -1,30 +1,37 @@ package com.paypal.sample; -import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ObjectNode; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; -import org.springframework.util.LinkedMultiValueMap; -import org.springframework.util.MultiValueMap; - import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.client.RestTemplate; +import com.paypal.sdk.Environment; +import com.paypal.sdk.PaypalServerSDKClient; +import com.paypal.sdk.authentication.ClientCredentialsAuthModel; +import com.paypal.sdk.controllers.OrdersController; +import com.paypal.sdk.exceptions.ApiException; +import com.paypal.sdk.http.response.ApiResponse; +import com.paypal.sdk.models.AmountWithBreakdown; +import com.paypal.sdk.models.CheckoutPaymentIntent; +import com.paypal.sdk.models.Order; +import com.paypal.sdk.models.OrderRequest; +import com.paypal.sdk.models.OrdersCaptureInput; +import com.paypal.sdk.models.OrdersCreateInput; +import com.paypal.sdk.models.PurchaseUnitRequest; +import java.util.Arrays; +import org.slf4j.event.Level; + import java.io.IOException; -import java.util.Base64; import java.util.Map; @SpringBootApplication @@ -36,8 +43,6 @@ public class SampleAppApplication { @Value("${PAYPAL_CLIENT_SECRET}") private String PAYPAL_CLIENT_SECRET; - private final String BASE_URL = "https://api-m.sandbox.paypal.com"; - public static void main(String[] args) { SpringApplication.run(SampleAppApplication.class, args); } @@ -47,23 +52,41 @@ public RestTemplate restTemplate() { return new RestTemplate(); } + @Bean + public PaypalServerSDKClient paypalClient() { + return new PaypalServerSDKClient.Builder() + .loggingConfig(builder -> builder + .level(Level.DEBUG) + .requestConfig(logConfigBuilder -> logConfigBuilder.body(true)) + .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true))) + .httpClientConfig(configBuilder -> configBuilder + .timeout(0)) + .environment(Environment.SANDBOX) + .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder( + PAYPAL_CLIENT_ID, + PAYPAL_CLIENT_SECRET) + .build()) + .build(); + } + + @Controller @RequestMapping("/") public class CheckoutController { - private final RestTemplate restTemplate; private final ObjectMapper objectMapper; + private final PaypalServerSDKClient client; - public CheckoutController(RestTemplate restTemplate, ObjectMapper objectMapper) { - this.restTemplate = restTemplate; + public CheckoutController(ObjectMapper objectMapper, PaypalServerSDKClient client) { this.objectMapper = objectMapper; + this.client = client; } @PostMapping("/api/orders") - public ResponseEntity createOrder(@RequestBody Map request) { + public ResponseEntity createOrder(@RequestBody Map request) { try { String cart = objectMapper.writeValueAsString(request.get("cart")); - JsonNode response = createOrder(cart); + Order response = createOrder(cart); return new ResponseEntity<>(response, HttpStatus.OK); } catch (Exception e) { e.printStackTrace(); @@ -72,69 +95,47 @@ public ResponseEntity createOrder(@RequestBody Map req } @PostMapping("/api/orders/{orderID}/capture") - public ResponseEntity captureOrder(@PathVariable String orderID) { + public ResponseEntity captureOrder(@PathVariable String orderID) { try { - JsonNode response = captureOrders(orderID); - return new ResponseEntity<>(response, HttpStatus.OK); + Order response = captureOrders(orderID); + return new ResponseEntity(response, HttpStatus.OK); } catch (Exception e) { e.printStackTrace(); return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR); } } - private String generateAccessToken() throws IOException { - if (PAYPAL_CLIENT_ID == null || PAYPAL_CLIENT_SECRET == null) { - throw new IllegalArgumentException("MISSING_API_CREDENTIALS"); - } - String auth = Base64.getEncoder().encodeToString((PAYPAL_CLIENT_ID + ":" + PAYPAL_CLIENT_SECRET).getBytes()); - HttpHeaders headers = new HttpHeaders(); - headers.setBasicAuth(auth); - headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); - - MultiValueMap body = new LinkedMultiValueMap<>(); - body.add("grant_type", "client_credentials"); - - ResponseEntity response = restTemplate.postForEntity(BASE_URL + "/v1/oauth2/token", new HttpEntity<>(body, headers), JsonNode.class); - return response.getBody().get("access_token").asText(); - } - - private JsonNode createOrder(String cart) throws IOException { - String accessToken = generateAccessToken(); - String url = BASE_URL + "/v2/checkout/orders"; + private Order createOrder(String cart) throws IOException, ApiException { - ObjectNode payload = objectMapper.createObjectNode(); - payload.put("intent", "CAPTURE"); - ObjectNode purchaseUnit = payload.putArray("purchase_units").addObject(); - ObjectNode amount = purchaseUnit.putObject("amount"); - amount.put("currency_code", "USD"); - amount.put("value", "100.00"); + OrdersCreateInput ordersCreateInput = new OrdersCreateInput.Builder( + null, + new OrderRequest.Builder( + CheckoutPaymentIntent.CAPTURE, + Arrays.asList( + new PurchaseUnitRequest.Builder( + new AmountWithBreakdown.Builder( + "USD", + "100.00") + .build()) + .build())) + .build()) + .build(); - HttpHeaders headers = new HttpHeaders(); - headers.setBearerAuth(accessToken); - headers.setContentType(MediaType.APPLICATION_JSON); + OrdersController ordersController = client.getOrdersController(); - ResponseEntity response = restTemplate.postForEntity(url, new HttpEntity<>(payload, headers), JsonNode.class); - return handleResponse(response); - } - - private JsonNode captureOrders(String orderID) throws IOException { - String accessToken = generateAccessToken(); - String url = BASE_URL + "/v2/checkout/orders/" + orderID + "/capture"; + ApiResponse apiResponse = ordersController.ordersCreate(ordersCreateInput); - HttpHeaders headers = new HttpHeaders(); - headers.setBearerAuth(accessToken); - headers.setContentType(MediaType.APPLICATION_JSON); - - ResponseEntity response = restTemplate.postForEntity(url, new HttpEntity<>(headers), JsonNode.class); - return handleResponse(response); + return apiResponse.getResult(); } - private JsonNode handleResponse(ResponseEntity response) throws IOException { - if (response.getStatusCode().is2xxSuccessful()) { - return response.getBody(); - } else { - throw new IOException(response.getBody().toString()); - } + private Order captureOrders(String orderID) throws IOException, ApiException { + OrdersCaptureInput ordersCaptureInput = new OrdersCaptureInput.Builder( + orderID, + null) + .build(); + OrdersController ordersController = client.getOrdersController(); + ApiResponse apiResponse = ordersController.ordersCapture(ordersCaptureInput); + return apiResponse.getResult(); } } } diff --git a/advanced-integration/v2/server/php/composer.json b/advanced-integration/v2/server/php/composer.json index 5adaa5aa..5dfd9351 100644 --- a/advanced-integration/v2/server/php/composer.json +++ b/advanced-integration/v2/server/php/composer.json @@ -6,7 +6,8 @@ "ext-json": "*", "guzzlehttp/guzzle": "^7.9", "monolog/monolog": "^2.8", - "php-di/php-di": "^6.4" + "php-di/php-di": "^6.4", + "paypal/paypal-server-sdk": "0.5.1" }, "require-dev": { "jangregor/phpstan-prophecy": "^1.0.0", @@ -25,4 +26,4 @@ "phpstan/extension-installer": true } } -} \ No newline at end of file +} diff --git a/advanced-integration/v2/server/php/composer.lock b/advanced-integration/v2/server/php/composer.lock index 351abe8e..8e09a754 100644 --- a/advanced-integration/v2/server/php/composer.lock +++ b/advanced-integration/v2/server/php/composer.lock @@ -4,125 +4,223 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "215478eda9b5efd723cd51c11808902f", + "content-hash": "5efc5bdfe116b87d9c0f2661ff4481b2", "packages": [ { - "name": "fig/http-message-util", - "version": "1.1.5", + "name": "apimatic/core", + "version": "0.3.11", "source": { "type": "git", - "url": "https://github.com/php-fig/http-message-util.git", - "reference": "9d94dc0154230ac39e5bf89398b324a86f63f765" + "url": "https://github.com/apimatic/core-lib-php.git", + "reference": "2274f103f9f210664f546f504e4559d772a81fee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message-util/zipball/9d94dc0154230ac39e5bf89398b324a86f63f765", - "reference": "9d94dc0154230ac39e5bf89398b324a86f63f765", + "url": "https://api.github.com/repos/apimatic/core-lib-php/zipball/2274f103f9f210664f546f504e4559d772a81fee", + "reference": "2274f103f9f210664f546f504e4559d772a81fee", "shasum": "" }, "require": { - "php": "^5.3 || ^7.0 || ^8.0" + "apimatic/core-interfaces": "~0.1.5", + "apimatic/jsonmapper": "^3.1.1", + "ext-curl": "*", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "php": "^7.2 || ^8.0", + "php-jsonpointer/php-jsonpointer": "^3.0.2", + "psr/log": "^1.1.4 || ^2.0.0 || ^3.0.0" }, - "suggest": { - "psr/http-message": "The package containing the PSR-7 interfaces" + "require-dev": { + "phan/phan": "5.4.2", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "squizlabs/php_codesniffer": "^3.5" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, "autoload": { "psr-4": { - "Fig\\Http\\Message\\": "src/" + "Core\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "description": "Core logic and the utilities for the Apimatic's PHP SDK", + "homepage": "https://github.com/apimatic/core-lib-php", + "keywords": [ + "apimatic", + "core", + "corelib", + "php" + ], + "support": { + "issues": "https://github.com/apimatic/core-lib-php/issues", + "source": "https://github.com/apimatic/core-lib-php/tree/0.3.11" + }, + "time": "2024-07-08T11:50:08+00:00" + }, + { + "name": "apimatic/core-interfaces", + "version": "0.1.5", + "source": { + "type": "git", + "url": "https://github.com/apimatic/core-interfaces-php.git", + "reference": "b4f1bffc8be79584836f70af33c65e097eec155c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/apimatic/core-interfaces-php/zipball/b4f1bffc8be79584836f70af33c65e097eec155c", + "reference": "b4f1bffc8be79584836f70af33c65e097eec155c", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "CoreInterfaces\\": "src/" } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" ], - "description": "Utility classes and constants for use with PSR-7 (psr/http-message)", + "description": "Definition of the behavior of apimatic/core, apimatic/unirest-php and Apimatic's PHP SDK", + "homepage": "https://github.com/apimatic/core-interfaces-php", "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" + "apimatic", + "core", + "corelib", + "interface", + "php", + "unirest" ], "support": { - "issues": "https://github.com/php-fig/http-message-util/issues", - "source": "https://github.com/php-fig/http-message-util/tree/1.1.5" + "issues": "https://github.com/apimatic/core-interfaces-php/issues", + "source": "https://github.com/apimatic/core-interfaces-php/tree/0.1.5" }, - "time": "2020-11-24T22:02:12+00:00" + "time": "2024-05-09T06:32:07+00:00" }, { - "name": "graham-campbell/result-type", - "version": "v1.1.3", + "name": "apimatic/jsonmapper", + "version": "3.1.4", "source": { "type": "git", - "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "3ba905c11371512af9d9bdd27d99b782216b6945" + "url": "https://github.com/apimatic/jsonmapper.git", + "reference": "407b455d2adda2efa51a44b99400389fbee0394e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", - "reference": "3ba905c11371512af9d9bdd27d99b782216b6945", + "url": "https://api.github.com/repos/apimatic/jsonmapper/zipball/407b455d2adda2efa51a44b99400389fbee0394e", + "reference": "407b455d2adda2efa51a44b99400389fbee0394e", "shasum": "" }, "require": { - "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.3" + "ext-json": "*", + "php": "^5.6 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" + "phpunit/phpunit": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0", + "squizlabs/php_codesniffer": "^3.0.0" }, "type": "library", "autoload": { "psr-4": { - "GrahamCampbell\\ResultType\\": "src/" + "apimatic\\jsonmapper\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "OSL-3.0" ], "authors": [ { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" + "name": "Christian Weiske", + "email": "christian.weiske@netresearch.de", + "homepage": "http://www.netresearch.de/", + "role": "Developer" + }, + { + "name": "Mehdi Jaffery", + "email": "mehdi.jaffery@apimatic.io", + "homepage": "http://apimatic.io/", + "role": "Developer" } ], - "description": "An Implementation Of The Result Type", - "keywords": [ - "Graham Campbell", - "GrahamCampbell", - "Result Type", - "Result-Type", - "result" - ], + "description": "Map nested JSON structures onto PHP classes", "support": { - "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" + "email": "mehdi.jaffery@apimatic.io", + "issues": "https://github.com/apimatic/jsonmapper/issues", + "source": "https://github.com/apimatic/jsonmapper/tree/3.1.4" }, - "funding": [ + "time": "2024-06-11T11:48:30+00:00" + }, + { + "name": "apimatic/unirest-php", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/apimatic/unirest-php.git", + "reference": "e16754010c16be5473289470f129d87a0f41b55e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/apimatic/unirest-php/zipball/e16754010c16be5473289470f129d87a0f41b55e", + "reference": "e16754010c16be5473289470f129d87a0f41b55e", + "shasum": "" + }, + "require": { + "apimatic/core-interfaces": "^0.1.0", + "ext-curl": "*", + "ext-json": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "phan/phan": "5.4.2", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Unirest\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://github.com/GrahamCampbell", - "type": "github" + "name": "Mashape", + "email": "opensource@mashape.com", + "homepage": "https://www.mashape.com", + "role": "Developer" }, { - "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", - "type": "tidelift" + "name": "APIMATIC", + "email": "opensource@apimatic.io", + "homepage": "https://www.apimatic.io", + "role": "Developer" } ], - "time": "2024-07-20T21:45:45+00:00" + "description": "Unirest PHP", + "homepage": "https://github.com/apimatic/unirest-php", + "keywords": [ + "client", + "curl", + "http", + "https", + "rest" + ], + "support": { + "email": "opensource@apimatic.io", + "issues": "https://github.com/apimatic/unirest-php/issues", + "source": "https://github.com/apimatic/unirest-php/tree/4.0.5" + }, + "time": "2023-04-25T14:19:45+00:00" }, { "name": "guzzlehttp/guzzle", @@ -612,54 +710,47 @@ "time": "2024-04-12T20:52:51+00:00" }, { - "name": "nikic/fast-route", - "version": "v1.3.0", + "name": "paypal/paypal-server-sdk", + "version": "0.5.1", "source": { "type": "git", - "url": "https://github.com/nikic/FastRoute.git", - "reference": "181d480e08d9476e61381e04a71b34dc0432e812" + "url": "https://github.com/paypal/PayPal-PHP-Server-SDK.git", + "reference": "4f7eb529547de070defb3803257dc807be49342c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/FastRoute/zipball/181d480e08d9476e61381e04a71b34dc0432e812", - "reference": "181d480e08d9476e61381e04a71b34dc0432e812", + "url": "https://api.github.com/repos/paypal/PayPal-PHP-Server-SDK/zipball/4f7eb529547de070defb3803257dc807be49342c", + "reference": "4f7eb529547de070defb3803257dc807be49342c", "shasum": "" }, "require": { - "php": ">=5.4.0" + "apimatic/core": "~0.3.11", + "apimatic/core-interfaces": "~0.1.5", + "apimatic/unirest-php": "^4.0.0", + "ext-json": "*", + "php": "^7.2 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35|~5.7" + "phan/phan": "5.4.2", + "squizlabs/php_codesniffer": "^3.5" }, "type": "library", "autoload": { - "files": [ - "src/functions.php" - ], "psr-4": { - "FastRoute\\": "src/" + "PaypalServerSDKLib\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov", - "email": "nikic@php.net" - } - ], - "description": "Fast request router for PHP", - "keywords": [ - "router", - "routing" + "MIT" ], + "description": "PayPal's SDK for interacting with the REST APIs", + "homepage": "https://github.com/paypal/PayPal-PHP-Server-SDK", "support": { - "issues": "https://github.com/nikic/FastRoute/issues", - "source": "https://github.com/nikic/FastRoute/tree/master" + "issues": "https://github.com/paypal/PayPal-PHP-Server-SDK/issues", + "source": "https://github.com/paypal/PayPal-PHP-Server-SDK/tree/0.5.1" }, - "time": "2018-02-13T20:26:39+00:00" + "time": "2024-09-10T14:38:12+00:00" }, { "name": "php-di/invoker", @@ -835,79 +926,60 @@ "time": "2020-10-12T12:39:22+00:00" }, { - "name": "phpoption/phpoption", - "version": "1.9.3", + "name": "php-jsonpointer/php-jsonpointer", + "version": "v3.0.2", "source": { "type": "git", - "url": "https://github.com/schmittjoh/php-option.git", - "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" + "url": "https://github.com/raphaelstolt/php-jsonpointer.git", + "reference": "4428f86c6f23846e9faa5a420c4ef14e485b3afb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", - "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", + "url": "https://api.github.com/repos/raphaelstolt/php-jsonpointer/zipball/4428f86c6f23846e9faa5a420c4ef14e485b3afb", + "reference": "4428f86c6f23846e9faa5a420c4ef14e485b3afb", "shasum": "" }, "require": { - "php": "^7.2.5 || ^8.0" + "php": ">=5.4" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" + "friendsofphp/php-cs-fixer": "^1.11", + "phpunit/phpunit": "4.6.*" }, "type": "library", "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - }, "branch-alias": { - "dev-master": "1.9-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { - "psr-4": { - "PhpOption\\": "src/PhpOption/" + "psr-0": { + "Rs\\Json": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache-2.0" + "MIT" ], "authors": [ { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh" - }, - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" + "name": "Raphael Stolt", + "email": "raphael.stolt@gmail.com", + "homepage": "http://raphaelstolt.blogspot.com/" } ], - "description": "Option Type for PHP", + "description": "Implementation of JSON Pointer (http://tools.ietf.org/html/rfc6901)", + "homepage": "https://github.com/raphaelstolt/php-jsonpointer", "keywords": [ - "language", - "option", - "php", - "type" + "json", + "json pointer", + "json traversal" ], "support": { - "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" + "issues": "https://github.com/raphaelstolt/php-jsonpointer/issues", + "source": "https://github.com/raphaelstolt/php-jsonpointer/tree/master" }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", - "type": "tidelift" - } - ], - "time": "2024-07-20T21:41:07+00:00" + "time": "2016-08-29T08:51:01+00:00" }, { "name": "psr/container", @@ -1117,119 +1189,6 @@ }, "time": "2023-04-04T09:54:51+00:00" }, - { - "name": "psr/http-server-handler", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-server-handler.git", - "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/84c4fb66179be4caaf8e97bd239203245302e7d4", - "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "psr/http-message": "^1.0 || ^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP server-side request handler", - "keywords": [ - "handler", - "http", - "http-interop", - "psr", - "psr-15", - "psr-7", - "request", - "response", - "server" - ], - "support": { - "source": "https://github.com/php-fig/http-server-handler/tree/1.0.2" - }, - "time": "2023-04-10T20:06:20+00:00" - }, - { - "name": "psr/http-server-middleware", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-server-middleware.git", - "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/c1481f747daaa6a0782775cd6a8c26a1bf4a3829", - "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "psr/http-message": "^1.0 || ^2.0", - "psr/http-server-handler": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP server-side middleware", - "keywords": [ - "http", - "http-interop", - "middleware", - "psr", - "psr-15", - "psr-7", - "request", - "response" - ], - "support": { - "issues": "https://github.com/php-fig/http-server-middleware/issues", - "source": "https://github.com/php-fig/http-server-middleware/tree/1.0.2" - }, - "time": "2023-04-11T06:14:47+00:00" - }, { "name": "psr/log", "version": "3.0.0", @@ -1325,369 +1284,45 @@ "time": "2019-03-08T08:55:37+00:00" }, { - "name": "slim/http", - "version": "1.4.0", + "name": "symfony/deprecation-contracts", + "version": "v3.5.0", "source": { "type": "git", - "url": "https://github.com/slimphp/Slim-Http.git", - "reference": "a8def7b8e9eabd0cdc21654ad4a82606942e066a" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim-Http/zipball/a8def7b8e9eabd0cdc21654ad4a82606942e066a", - "reference": "a8def7b8e9eabd0cdc21654ad4a82606942e066a", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", "shasum": "" }, "require": { - "ext-fileinfo": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-simplexml": "*", - "php": "^8.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.1 || ^2.0" - }, - "require-dev": { - "adriansuter/php-autoload-override": "^1.4", - "doctrine/instantiator": "^1.3.1", - "laminas/laminas-diactoros": "^3.1.0", - "nyholm/psr7": "^1.8.1", - "php-http/psr7-integration-tests": "^1.3.0", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^9.6", - "squizlabs/php_codesniffer": "^3.9" + "php": ">=8.1" }, "type": "library", - "autoload": { - "psr-4": { - "Slim\\Http\\": "src/" + "extra": { + "branch-alias": { + "dev-main": "3.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, + "autoload": { + "files": [ + "function.php" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { - "name": "Josh Lockhart", - "email": "hello@joshlockhart.com", - "homepage": "http://joshlockhart.com" - }, - { - "name": "Andrew Smith", - "email": "a.smith@silentworks.co.uk", - "homepage": "http://silentworks.co.uk" - }, - { - "name": "Rob Allen", - "email": "rob@akrabat.com", - "homepage": "http://akrabat.com" - }, - { - "name": "Pierre Berube", - "email": "pierre@lgse.com", - "homepage": "http://www.lgse.com" - } - ], - "description": "Slim PSR-7 Object Decorators", - "homepage": "http://slimframework.com", - "keywords": [ - "http", - "psr-7", - "psr7" - ], - "support": { - "issues": "https://github.com/slimphp/Slim-Http/issues", - "source": "https://github.com/slimphp/Slim-Http/tree/1.4.0" - }, - "time": "2024-06-24T18:27:41+00:00" - }, - { - "name": "slim/middleware", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/slimphp/Slim-Middleware.git", - "reference": "1190251a89a3044eda9d16dcb456dc92dba2d0c8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim-Middleware/zipball/1190251a89a3044eda9d16dcb456dc92dba2d0c8", - "reference": "1190251a89a3044eda9d16dcb456dc92dba2d0c8", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "slim/slim": ">=2.3.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "Slim": "./src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Josh Lockhart", - "email": "info@joshlockhart.com", - "homepage": "http://www.joshlockhart.com/" - } - ], - "description": "Slim Framework middleware", - "homepage": "http://github.com/codeguy/Slim", - "keywords": [ - "middleware", - "slim" - ], - "support": { - "issues": "https://github.com/slimphp/Slim-Middleware/issues", - "source": "https://github.com/slimphp/Slim-Middleware/tree/1.0.0" - }, - "abandoned": true, - "time": "2013-09-18T18:13:40+00:00" - }, - { - "name": "slim/psr7", - "version": "1.7.0", - "source": { - "type": "git", - "url": "https://github.com/slimphp/Slim-Psr7.git", - "reference": "753e9646def5ff4db1a06e5cf4ef539bfd30f467" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim-Psr7/zipball/753e9646def5ff4db1a06e5cf4ef539bfd30f467", - "reference": "753e9646def5ff4db1a06e5cf4ef539bfd30f467", - "shasum": "" - }, - "require": { - "fig/http-message-util": "^1.1.5", - "php": "^8.0", - "psr/http-factory": "^1.1", - "psr/http-message": "^1.0 || ^2.0", - "ralouphie/getallheaders": "^3.0", - "symfony/polyfill-php80": "^1.29" - }, - "provide": { - "psr/http-factory-implementation": "^1.0", - "psr/http-message-implementation": "^1.0 || ^2.0" - }, - "require-dev": { - "adriansuter/php-autoload-override": "^1.4", - "ext-json": "*", - "http-interop/http-factory-tests": "^1.1.0", - "php-http/psr7-integration-tests": "1.3.0", - "phpspec/prophecy": "^1.19", - "phpspec/prophecy-phpunit": "^2.2", - "phpstan/phpstan": "^1.11", - "phpunit/phpunit": "^9.6", - "squizlabs/php_codesniffer": "^3.10" - }, - "type": "library", - "autoload": { - "psr-4": { - "Slim\\Psr7\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Josh Lockhart", - "email": "hello@joshlockhart.com", - "homepage": "http://joshlockhart.com" - }, - { - "name": "Andrew Smith", - "email": "a.smith@silentworks.co.uk", - "homepage": "http://silentworks.co.uk" - }, - { - "name": "Rob Allen", - "email": "rob@akrabat.com", - "homepage": "http://akrabat.com" - }, - { - "name": "Pierre Berube", - "email": "pierre@lgse.com", - "homepage": "http://www.lgse.com" - } - ], - "description": "Strict PSR-7 implementation", - "homepage": "https://www.slimframework.com", - "keywords": [ - "http", - "psr-7", - "psr7" - ], - "support": { - "issues": "https://github.com/slimphp/Slim-Psr7/issues", - "source": "https://github.com/slimphp/Slim-Psr7/tree/1.7.0" - }, - "time": "2024-06-08T14:48:17+00:00" - }, - { - "name": "slim/slim", - "version": "4.14.0", - "source": { - "type": "git", - "url": "https://github.com/slimphp/Slim.git", - "reference": "5943393b88716eb9e82c4161caa956af63423913" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim/zipball/5943393b88716eb9e82c4161caa956af63423913", - "reference": "5943393b88716eb9e82c4161caa956af63423913", - "shasum": "" - }, - "require": { - "ext-json": "*", - "nikic/fast-route": "^1.3", - "php": "^7.4 || ^8.0", - "psr/container": "^1.0 || ^2.0", - "psr/http-factory": "^1.1", - "psr/http-message": "^1.1 || ^2.0", - "psr/http-server-handler": "^1.0", - "psr/http-server-middleware": "^1.0", - "psr/log": "^1.1 || ^2.0 || ^3.0" - }, - "require-dev": { - "adriansuter/php-autoload-override": "^1.4", - "ext-simplexml": "*", - "guzzlehttp/psr7": "^2.6", - "httpsoft/http-message": "^1.1", - "httpsoft/http-server-request": "^1.1", - "laminas/laminas-diactoros": "^2.17 || ^3", - "nyholm/psr7": "^1.8", - "nyholm/psr7-server": "^1.1", - "phpspec/prophecy": "^1.19", - "phpspec/prophecy-phpunit": "^2.1", - "phpstan/phpstan": "^1.11", - "phpunit/phpunit": "^9.6", - "slim/http": "^1.3", - "slim/psr7": "^1.6", - "squizlabs/php_codesniffer": "^3.10", - "vimeo/psalm": "^5.24" - }, - "suggest": { - "ext-simplexml": "Needed to support XML format in BodyParsingMiddleware", - "ext-xml": "Needed to support XML format in BodyParsingMiddleware", - "php-di/php-di": "PHP-DI is the recommended container library to be used with Slim", - "slim/psr7": "Slim PSR-7 implementation. See https://www.slimframework.com/docs/v4/start/installation.html for more information." - }, - "type": "library", - "autoload": { - "psr-4": { - "Slim\\": "Slim" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Josh Lockhart", - "email": "hello@joshlockhart.com", - "homepage": "https://joshlockhart.com" - }, - { - "name": "Andrew Smith", - "email": "a.smith@silentworks.co.uk", - "homepage": "http://silentworks.co.uk" - }, - { - "name": "Rob Allen", - "email": "rob@akrabat.com", - "homepage": "http://akrabat.com" - }, - { - "name": "Pierre Berube", - "email": "pierre@lgse.com", - "homepage": "http://www.lgse.com" - }, - { - "name": "Gabriel Manricks", - "email": "gmanricks@me.com", - "homepage": "http://gabrielmanricks.com" - } - ], - "description": "Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs", - "homepage": "https://www.slimframework.com", - "keywords": [ - "api", - "framework", - "micro", - "router" - ], - "support": { - "docs": "https://www.slimframework.com/docs/v4/", - "forum": "https://discourse.slimframework.com/", - "irc": "irc://irc.freenode.net:6667/slimphp", - "issues": "https://github.com/slimphp/Slim/issues", - "rss": "https://www.slimframework.com/blog/feed.rss", - "slack": "https://slimphp.slack.com/", - "source": "https://github.com/slimphp/Slim", - "wiki": "https://github.com/slimphp/Slim/wiki" - }, - "funding": [ - { - "url": "https://opencollective.com/slimphp", - "type": "open_collective" - }, - { - "url": "https://tidelift.com/funding/github/packagist/slim/slim", - "type": "tidelift" - } - ], - "time": "2024-06-13T08:54:48+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v3.5.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", @@ -1714,329 +1349,6 @@ } ], "time": "2024-04-18T09:32:20+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.30.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-05-31T15:07:36+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.30.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-06-19T12:30:46+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.30.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-05-31T15:07:36+00:00" - }, - { - "name": "vlucas/phpdotenv", - "version": "v5.6.1", - "source": { - "type": "git", - "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/a59a13791077fe3d44f90e7133eb68e7d22eaff2", - "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2", - "shasum": "" - }, - "require": { - "ext-pcre": "*", - "graham-campbell/result-type": "^1.1.3", - "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.3", - "symfony/polyfill-ctype": "^1.24", - "symfony/polyfill-mbstring": "^1.24", - "symfony/polyfill-php80": "^1.24" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "ext-filter": "*", - "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" - }, - "suggest": { - "ext-filter": "Required to use the boolean validator." - }, - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - }, - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Dotenv\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Vance Lucas", - "email": "vance@vancelucas.com", - "homepage": "https://github.com/vlucas" - } - ], - "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", - "keywords": [ - "dotenv", - "env", - "environment" - ], - "support": { - "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", - "type": "tidelift" - } - ], - "time": "2024-07-20T21:52:34+00:00" } ], "packages-dev": [ diff --git a/advanced-integration/v2/server/php/server/index.php b/advanced-integration/v2/server/php/server/index.php index 81a25ada..21ba1ec8 100644 --- a/advanced-integration/v2/server/php/server/index.php +++ b/advanced-integration/v2/server/php/server/index.php @@ -1,107 +1,83 @@ false]); - $response = $client->post("$base/v1/oauth2/token", [ - 'form_params' => [ - 'grant_type' => 'client_credentials' - ], - 'headers' => [ - 'Authorization' => "Basic $auth" - ] - ]); - - $data = json_decode($response->getBody(), true); - return $data['access_token']; -} +$client = PaypalServerSDKClientBuilder::init() + ->clientCredentialsAuthCredentials( + ClientCredentialsAuthCredentialsBuilder::init( + $PAYPAL_CLIENT_ID, + $PAYPAL_CLIENT_SECRET + ) + ) + ->environment(Environment::SANDBOX) + ->build(); /** * Create an order to start the transaction. * @see https://developer.paypal.com/docs/api/orders/v2/#orders_create */ -function createOrder($cart) { - global $base; - - $accessToken = generateAccessToken(); - - // Disabling certificate validation for local development - $client = new Client(['verify' => false]); - $payload = [ - 'intent' => 'CAPTURE', - 'purchase_units' => [ +function createOrder($cart) +{ + global $client; + + $orderBody = [ + 'body' => OrderRequestBuilder::init( + CheckoutPaymentIntent::CAPTURE, [ - 'amount' => [ - 'currency_code' => 'USD', - 'value' => '100.00' - ] + PurchaseUnitRequestBuilder::init( + AmountWithBreakdownBuilder::init( + 'USD', + '100.00' + )->build() + )->build() ] - ], + )->build() ]; - $response = $client->post("$base/v2/checkout/orders", [ - 'headers' => [ - 'Content-Type' => 'application/json', - 'Authorization' => "Bearer $accessToken" - ], - 'json' => $payload - ]); + $apiResponse = $client->getOrdersController()->ordersCreate($orderBody); - return handleResponse($response); + return handleResponse($apiResponse); } /** * Capture payment for the created order to complete the transaction. * @see https://developer.paypal.com/docs/api/orders/v2/#orders_capture */ -function captureOrder($orderID) { - global $base; +function captureOrder($orderID) +{ + global $client; - $accessToken = generateAccessToken(); + $captureBody = [ + 'id' => $orderID + ]; - // Disabling certificate validation for local development - $client = new Client(['verify' => false]); - $response = $client->post("$base/v2/checkout/orders/$orderID/capture", [ - 'headers' => [ - 'Content-Type' => 'application/json', - 'Authorization' => "Bearer $accessToken" - ] - ]); + $apiResponse = $client->getOrdersController()->ordersCapture($captureBody); - return handleResponse($response); + return handleResponse($apiResponse); } -function handleResponse($response) { - $jsonResponse = json_decode($response->getBody(), true); +function handleResponse($response) +{ return [ - 'jsonResponse' => $jsonResponse, + 'jsonResponse' => $response->getResult(), 'httpStatusCode' => $response->getStatusCode() ]; } $endpoint = $_SERVER['REQUEST_URI']; -if($endpoint === '/') { +if ($endpoint === '/') { try { $response = [ "message" => "Server is running" @@ -114,7 +90,7 @@ function handleResponse($response) { } } -if($endpoint === '/api/orders') { +if ($endpoint === '/api/orders') { $data = json_decode(file_get_contents('php://input'), true); $cart = $data['cart']; header('Content-Type: application/json'); @@ -128,7 +104,7 @@ function handleResponse($response) { } -if(str_ends_with($endpoint, '/capture')) { +if (str_ends_with($endpoint, '/capture')) { $urlSegments = explode('/', $endpoint); end($urlSegments); // Will set the pointer to the end of array $orderID = prev($urlSegments); From 5e13a25aa0927a399fd6aa215d758457435a4a46 Mon Sep 17 00:00:00 2001 From: Louis Low Date: Fri, 20 Sep 2024 10:22:09 +0800 Subject: [PATCH 06/18] remove logic to create new .env in codespace change name for devcontainer --- .../advanced-integration-v2-html-dotnet/devcontainer.json | 2 +- .../advanced-integration-v2-html-java/devcontainer.json | 2 +- .../advanced-integration-v2-html-node/devcontainer.json | 2 +- .../advanced-integration-v2-html-php/devcontainer.json | 2 +- .../advanced-integration-v2-react-dotnet/devcontainer.json | 2 +- .../advanced-integration-v2-react-java/devcontainer.json | 2 +- .../advanced-integration-v2-react-node/devcontainer.json | 2 +- .../advanced-integration-v2-react-php/devcontainer.json | 2 +- .devcontainer/post-commands.sh | 4 ++-- .../standard-integration-html-dotnet/devcontainer.json | 2 +- .../standard-integration-html-java/devcontainer.json | 2 +- .../standard-integration-html-node/devcontainer.json | 2 +- .devcontainer/standard-integration-html-php/devcontainer.json | 2 +- .../standard-integration-react-dotnet/devcontainer.json | 2 +- .../standard-integration-react-java/devcontainer.json | 2 +- .../standard-integration-react-node/devcontainer.json | 2 +- .../standard-integration-react-php/devcontainer.json | 2 +- 17 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.devcontainer/advanced-integration-v2-html-dotnet/devcontainer.json b/.devcontainer/advanced-integration-v2-html-dotnet/devcontainer.json index d04cf42b..65fa37f6 100644 --- a/.devcontainer/advanced-integration-v2-html-dotnet/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-html-dotnet/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "advanced-integration/client-html/server-dotnet", + "name": "advanced-integration/html/dotnet", "image": "mcr.microsoft.com/devcontainers/dotnet:8.0", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/advanced-integration-v2-html-java/devcontainer.json b/.devcontainer/advanced-integration-v2-html-java/devcontainer.json index 16915c08..a9e777b1 100644 --- a/.devcontainer/advanced-integration-v2-html-java/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-html-java/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "advanced-integration/client-html/server-java", + "name": "advanced-integration/html/java", "image": "mcr.microsoft.com/devcontainers/java:21", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/advanced-integration-v2-html-node/devcontainer.json b/.devcontainer/advanced-integration-v2-html-node/devcontainer.json index efade83b..3e254123 100644 --- a/.devcontainer/advanced-integration-v2-html-node/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-html-node/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "advanced-integration/client-html/server-node", + "name": "advanced-integration/html/node", "image": "mcr.microsoft.com/devcontainers/javascript-node:20", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/advanced-integration-v2-html-php/devcontainer.json b/.devcontainer/advanced-integration-v2-html-php/devcontainer.json index 477a6b79..ab087a51 100644 --- a/.devcontainer/advanced-integration-v2-html-php/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-html-php/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "advanced-integration/client-html/server-php", + "name": "advanced-integration/html/php", "image": "mcr.microsoft.com/devcontainers/php:8", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/advanced-integration-v2-react-dotnet/devcontainer.json b/.devcontainer/advanced-integration-v2-react-dotnet/devcontainer.json index f26a59f1..4a21167a 100644 --- a/.devcontainer/advanced-integration-v2-react-dotnet/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-react-dotnet/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": " advanced-integration/client-react/server-dotnet", + "name": " advanced-integration/react/dotnet", "image": "mcr.microsoft.com/devcontainers/dotnet:8.0", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/advanced-integration-v2-react-java/devcontainer.json b/.devcontainer/advanced-integration-v2-react-java/devcontainer.json index f0f9b3b7..0a272c0f 100644 --- a/.devcontainer/advanced-integration-v2-react-java/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-react-java/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "advanced-integration/client-react/server-java", + "name": "advanced-integration/react/java", "image": "mcr.microsoft.com/devcontainers/java:21", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/advanced-integration-v2-react-node/devcontainer.json b/.devcontainer/advanced-integration-v2-react-node/devcontainer.json index c8a98975..c1660b28 100644 --- a/.devcontainer/advanced-integration-v2-react-node/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-react-node/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "advanced-integration/client-react/server-node", + "name": "advanced-integration/react/node", "image": "mcr.microsoft.com/devcontainers/javascript-node:20", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/advanced-integration-v2-react-php/devcontainer.json b/.devcontainer/advanced-integration-v2-react-php/devcontainer.json index 34a91fb0..b1870838 100644 --- a/.devcontainer/advanced-integration-v2-react-php/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-react-php/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "advanced-integration/client-react/server-php", + "name": "advanced-integration/react/php", "image": "mcr.microsoft.com/devcontainers/php:8", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/post-commands.sh b/.devcontainer/post-commands.sh index db59d951..ffdf0fc3 100755 --- a/.devcontainer/post-commands.sh +++ b/.devcontainer/post-commands.sh @@ -26,13 +26,13 @@ setup_backend() { cd "$SERVER_DIR/node" && npm install ;; java) - cd "$SERVER_DIR" && touch java/.env && cd java && mvn clean install + cd "$SERVER_DIR" && cd java && mvn clean install ;; dotnet) cd "$SERVER_DIR/dotnet" && dotnet restore ;; php) - cd "$SERVER_DIR" && touch php/.env && cd php && composer install + cd "$SERVER_DIR" && cd php && composer install ;; *) echo "Unknown server: $VISIBLE_FOLDER_SERVER" diff --git a/.devcontainer/standard-integration-html-dotnet/devcontainer.json b/.devcontainer/standard-integration-html-dotnet/devcontainer.json index cfda05fb..810ffa39 100644 --- a/.devcontainer/standard-integration-html-dotnet/devcontainer.json +++ b/.devcontainer/standard-integration-html-dotnet/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "standard-integration/client-html/server-dotnet", + "name": "standard-integration/html/dotnet", "image": "mcr.microsoft.com/devcontainers/dotnet:8.0", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/standard-integration-html-java/devcontainer.json b/.devcontainer/standard-integration-html-java/devcontainer.json index 84a59669..88f7280a 100644 --- a/.devcontainer/standard-integration-html-java/devcontainer.json +++ b/.devcontainer/standard-integration-html-java/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "standard-integration/client-html/server-java", + "name": "standard-integration/html/java", "image": "mcr.microsoft.com/devcontainers/java:21", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/standard-integration-html-node/devcontainer.json b/.devcontainer/standard-integration-html-node/devcontainer.json index 2fc7df6d..beaa4863 100644 --- a/.devcontainer/standard-integration-html-node/devcontainer.json +++ b/.devcontainer/standard-integration-html-node/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "standard-integration/client-html/server-node", + "name": "standard-integration/html/node", "image": "mcr.microsoft.com/devcontainers/javascript-node:20", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/standard-integration-html-php/devcontainer.json b/.devcontainer/standard-integration-html-php/devcontainer.json index 8e219203..fc60c8f7 100644 --- a/.devcontainer/standard-integration-html-php/devcontainer.json +++ b/.devcontainer/standard-integration-html-php/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "standard-integration/client-html/server-php", + "name": "standard-integration/html/php", "image": "mcr.microsoft.com/devcontainers/php:8", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/standard-integration-react-dotnet/devcontainer.json b/.devcontainer/standard-integration-react-dotnet/devcontainer.json index 919d294f..d2a2e587 100644 --- a/.devcontainer/standard-integration-react-dotnet/devcontainer.json +++ b/.devcontainer/standard-integration-react-dotnet/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "standard-integration/client-react/server-dotnet", + "name": "standard-integration/react/dotnet", "image": "mcr.microsoft.com/devcontainers/dotnet:8.0", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/standard-integration-react-java/devcontainer.json b/.devcontainer/standard-integration-react-java/devcontainer.json index 5cdb28f2..d9f5d333 100644 --- a/.devcontainer/standard-integration-react-java/devcontainer.json +++ b/.devcontainer/standard-integration-react-java/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "standard-integration/client-react/server-java", + "name": "standard-integration/react/java", "image": "mcr.microsoft.com/devcontainers/java:21", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/standard-integration-react-node/devcontainer.json b/.devcontainer/standard-integration-react-node/devcontainer.json index 61e5d68c..fa64ab68 100644 --- a/.devcontainer/standard-integration-react-node/devcontainer.json +++ b/.devcontainer/standard-integration-react-node/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "standard-integration/client-react/server-node", + "name": "standard-integration/react/node", "image": "mcr.microsoft.com/devcontainers/javascript-node:20", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/standard-integration-react-php/devcontainer.json b/.devcontainer/standard-integration-react-php/devcontainer.json index e0af4870..e5bfcf12 100644 --- a/.devcontainer/standard-integration-react-php/devcontainer.json +++ b/.devcontainer/standard-integration-react-php/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "standard-integration/client-react/server-php", + "name": "standard-integration/react/php", "image": "mcr.microsoft.com/devcontainers/php:8", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. From 0926c012e17e2c0b83cf023a3b47914556365882 Mon Sep 17 00:00:00 2001 From: Sourav Sarkar Date: Wed, 25 Sep 2024 09:47:28 +0530 Subject: [PATCH 07/18] feat: update standard integration to use server sdks --- standard-integration/server/java/README.md | 38 +- standard-integration/server/java/pom.xml | 13 +- .../paypal/sample/SampleAppApplication.java | 133 +- standard-integration/server/php/composer.json | 3 +- standard-integration/server/php/composer.lock | 1271 ++++------------- .../server/php/server/index.php | 116 +- 6 files changed, 450 insertions(+), 1124 deletions(-) diff --git a/standard-integration/server/java/README.md b/standard-integration/server/java/README.md index 343200e7..8d8b9f39 100644 --- a/standard-integration/server/java/README.md +++ b/standard-integration/server/java/README.md @@ -1,18 +1,38 @@ # Standard Integartion Java Sample + PayPal Standard Integration sample in Java ## Running the sample -1. Build the server +1. Environmental Variables + + - Navigate to the file `src/main/resources/application.properties` + - Update the following keys with their actual values - + + ```sh + PAYPAL_CLIENT_ID= + PAYPAL_CLIENT_SECRET= + ``` + +2. Build the server + + ```bash + mvn clean install + ``` + +3. Run the server + + ```bash + mvn spring-boot:run + ``` -~~~ -mvn clean install -~~~ +4. Start the client -2. Run the server + - Navigate to one of the client folder and follow the installation steps + - Start the client -~~~ -mvn spring-boot:run -~~~ + ```sh + npm run dev + ``` -3. Go to [http://localhost:8080/](http://localhost:8080/) + This will start the development server, and you should be able to access the Advanced Checkout Page in your browser at `http://localhost:3000` (or the port specfied in the terminal output). diff --git a/standard-integration/server/java/pom.xml b/standard-integration/server/java/pom.xml index 48e7a01c..647f687c 100644 --- a/standard-integration/server/java/pom.xml +++ b/standard-integration/server/java/pom.xml @@ -27,7 +27,7 @@ - 22 + 21 @@ -38,6 +38,17 @@ org.springframework.boot spring-boot-starter-web + + + com.paypal.sdk + + + paypal-server-sdk + + + 0.5.1 + + diff --git a/standard-integration/server/java/src/main/java/com/paypal/sample/SampleAppApplication.java b/standard-integration/server/java/src/main/java/com/paypal/sample/SampleAppApplication.java index b4f3b4ae..f34fef3a 100644 --- a/standard-integration/server/java/src/main/java/com/paypal/sample/SampleAppApplication.java +++ b/standard-integration/server/java/src/main/java/com/paypal/sample/SampleAppApplication.java @@ -1,30 +1,37 @@ package com.paypal.sample; -import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ObjectNode; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; -import org.springframework.util.LinkedMultiValueMap; -import org.springframework.util.MultiValueMap; - import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.client.RestTemplate; +import com.paypal.sdk.Environment; +import com.paypal.sdk.PaypalServerSDKClient; +import com.paypal.sdk.authentication.ClientCredentialsAuthModel; +import com.paypal.sdk.controllers.OrdersController; +import com.paypal.sdk.exceptions.ApiException; +import com.paypal.sdk.http.response.ApiResponse; +import com.paypal.sdk.models.AmountWithBreakdown; +import com.paypal.sdk.models.CheckoutPaymentIntent; +import com.paypal.sdk.models.Order; +import com.paypal.sdk.models.OrderRequest; +import com.paypal.sdk.models.OrdersCaptureInput; +import com.paypal.sdk.models.OrdersCreateInput; +import com.paypal.sdk.models.PurchaseUnitRequest; +import java.util.Arrays; +import org.slf4j.event.Level; + import java.io.IOException; -import java.util.Base64; import java.util.Map; @SpringBootApplication @@ -36,8 +43,6 @@ public class SampleAppApplication { @Value("${PAYPAL_CLIENT_SECRET}") private String PAYPAL_CLIENT_SECRET; - private final String BASE_URL = "https://api-m.sandbox.paypal.com"; - public static void main(String[] args) { SpringApplication.run(SampleAppApplication.class, args); } @@ -47,23 +52,41 @@ public RestTemplate restTemplate() { return new RestTemplate(); } + @Bean + public PaypalServerSDKClient paypalClient() { + return new PaypalServerSDKClient.Builder() + .loggingConfig(builder -> builder + .level(Level.DEBUG) + .requestConfig(logConfigBuilder -> logConfigBuilder.body(true)) + .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true))) + .httpClientConfig(configBuilder -> configBuilder + .timeout(0)) + .environment(Environment.SANDBOX) + .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder( + PAYPAL_CLIENT_ID, + PAYPAL_CLIENT_SECRET) + .build()) + .build(); + } + + @Controller @RequestMapping("/") public class CheckoutController { - private final RestTemplate restTemplate; private final ObjectMapper objectMapper; + private final PaypalServerSDKClient client; - public CheckoutController(RestTemplate restTemplate, ObjectMapper objectMapper) { - this.restTemplate = restTemplate; + public CheckoutController(ObjectMapper objectMapper, PaypalServerSDKClient client) { this.objectMapper = objectMapper; + this.client = client; } @PostMapping("/api/orders") - public ResponseEntity createOrder(@RequestBody Map request) { + public ResponseEntity createOrder(@RequestBody Map request) { try { String cart = objectMapper.writeValueAsString(request.get("cart")); - JsonNode response = createOrder(cart); + Order response = createOrder(cart); return new ResponseEntity<>(response, HttpStatus.OK); } catch (Exception e) { e.printStackTrace(); @@ -72,69 +95,47 @@ public ResponseEntity createOrder(@RequestBody Map req } @PostMapping("/api/orders/{orderID}/capture") - public ResponseEntity captureOrder(@PathVariable String orderID) { + public ResponseEntity captureOrder(@PathVariable String orderID) { try { - JsonNode response = captureOrders(orderID); - return new ResponseEntity<>(response, HttpStatus.OK); + Order response = captureOrders(orderID); + return new ResponseEntity(response, HttpStatus.OK); } catch (Exception e) { e.printStackTrace(); return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR); } } - private String generateAccessToken() throws IOException { - if (PAYPAL_CLIENT_ID == null || PAYPAL_CLIENT_SECRET == null) { - throw new IllegalArgumentException("MISSING_API_CREDENTIALS"); - } - String auth = Base64.getEncoder().encodeToString((PAYPAL_CLIENT_ID + ":" + PAYPAL_CLIENT_SECRET).getBytes()); - HttpHeaders headers = new HttpHeaders(); - headers.setBasicAuth(auth); - headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); - - MultiValueMap body = new LinkedMultiValueMap<>(); - body.add("grant_type", "client_credentials"); - - ResponseEntity response = restTemplate.postForEntity(BASE_URL + "/v1/oauth2/token", new HttpEntity<>(body, headers), JsonNode.class); - return response.getBody().get("access_token").asText(); - } - - private JsonNode createOrder(String cart) throws IOException { - String accessToken = generateAccessToken(); - String url = BASE_URL + "/v2/checkout/orders"; + private Order createOrder(String cart) throws IOException, ApiException { - ObjectNode payload = objectMapper.createObjectNode(); - payload.put("intent", "CAPTURE"); - ObjectNode purchaseUnit = payload.putArray("purchase_units").addObject(); - ObjectNode amount = purchaseUnit.putObject("amount"); - amount.put("currency_code", "USD"); - amount.put("value", "100.00"); + OrdersCreateInput ordersCreateInput = new OrdersCreateInput.Builder( + null, + new OrderRequest.Builder( + CheckoutPaymentIntent.CAPTURE, + Arrays.asList( + new PurchaseUnitRequest.Builder( + new AmountWithBreakdown.Builder( + "USD", + "100.00") + .build()) + .build())) + .build()) + .build(); - HttpHeaders headers = new HttpHeaders(); - headers.setBearerAuth(accessToken); - headers.setContentType(MediaType.APPLICATION_JSON); + OrdersController ordersController = client.getOrdersController(); - ResponseEntity response = restTemplate.postForEntity(url, new HttpEntity<>(payload, headers), JsonNode.class); - return handleResponse(response); - } - - private JsonNode captureOrders(String orderID) throws IOException { - String accessToken = generateAccessToken(); - String url = BASE_URL + "/v2/checkout/orders/" + orderID + "/capture"; + ApiResponse apiResponse = ordersController.ordersCreate(ordersCreateInput); - HttpHeaders headers = new HttpHeaders(); - headers.setBearerAuth(accessToken); - headers.setContentType(MediaType.APPLICATION_JSON); - - ResponseEntity response = restTemplate.postForEntity(url, new HttpEntity<>(headers), JsonNode.class); - return handleResponse(response); + return apiResponse.getResult(); } - private JsonNode handleResponse(ResponseEntity response) throws IOException { - if (response.getStatusCode().is2xxSuccessful()) { - return response.getBody(); - } else { - throw new IOException(response.getBody().toString()); - } + private Order captureOrders(String orderID) throws IOException, ApiException { + OrdersCaptureInput ordersCaptureInput = new OrdersCaptureInput.Builder( + orderID, + null) + .build(); + OrdersController ordersController = client.getOrdersController(); + ApiResponse apiResponse = ordersController.ordersCapture(ordersCaptureInput); + return apiResponse.getResult(); } } } diff --git a/standard-integration/server/php/composer.json b/standard-integration/server/php/composer.json index 7f87a9c2..010fd632 100644 --- a/standard-integration/server/php/composer.json +++ b/standard-integration/server/php/composer.json @@ -6,7 +6,8 @@ "ext-json": "*", "guzzlehttp/guzzle": "^7.9", "monolog/monolog": "^2.8", - "php-di/php-di": "^6.4" + "php-di/php-di": "^6.4", + "paypal/paypal-server-sdk": "0.5.1" }, "require-dev": { "jangregor/phpstan-prophecy": "^1.0.0", diff --git a/standard-integration/server/php/composer.lock b/standard-integration/server/php/composer.lock index 351abe8e..f902cfbc 100644 --- a/standard-integration/server/php/composer.lock +++ b/standard-integration/server/php/composer.lock @@ -4,125 +4,223 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "215478eda9b5efd723cd51c11808902f", + "content-hash": "5efc5bdfe116b87d9c0f2661ff4481b2", "packages": [ { - "name": "fig/http-message-util", - "version": "1.1.5", + "name": "apimatic/core", + "version": "0.3.11", "source": { "type": "git", - "url": "https://github.com/php-fig/http-message-util.git", - "reference": "9d94dc0154230ac39e5bf89398b324a86f63f765" + "url": "https://github.com/apimatic/core-lib-php.git", + "reference": "2274f103f9f210664f546f504e4559d772a81fee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message-util/zipball/9d94dc0154230ac39e5bf89398b324a86f63f765", - "reference": "9d94dc0154230ac39e5bf89398b324a86f63f765", + "url": "https://api.github.com/repos/apimatic/core-lib-php/zipball/2274f103f9f210664f546f504e4559d772a81fee", + "reference": "2274f103f9f210664f546f504e4559d772a81fee", "shasum": "" }, "require": { - "php": "^5.3 || ^7.0 || ^8.0" + "apimatic/core-interfaces": "~0.1.5", + "apimatic/jsonmapper": "^3.1.1", + "ext-curl": "*", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "php": "^7.2 || ^8.0", + "php-jsonpointer/php-jsonpointer": "^3.0.2", + "psr/log": "^1.1.4 || ^2.0.0 || ^3.0.0" }, - "suggest": { - "psr/http-message": "The package containing the PSR-7 interfaces" + "require-dev": { + "phan/phan": "5.4.2", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "squizlabs/php_codesniffer": "^3.5" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, "autoload": { "psr-4": { - "Fig\\Http\\Message\\": "src/" + "Core\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "description": "Core logic and the utilities for the Apimatic's PHP SDK", + "homepage": "https://github.com/apimatic/core-lib-php", + "keywords": [ + "apimatic", + "core", + "corelib", + "php" + ], + "support": { + "issues": "https://github.com/apimatic/core-lib-php/issues", + "source": "https://github.com/apimatic/core-lib-php/tree/0.3.11" + }, + "time": "2024-07-08T11:50:08+00:00" + }, + { + "name": "apimatic/core-interfaces", + "version": "0.1.5", + "source": { + "type": "git", + "url": "https://github.com/apimatic/core-interfaces-php.git", + "reference": "b4f1bffc8be79584836f70af33c65e097eec155c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/apimatic/core-interfaces-php/zipball/b4f1bffc8be79584836f70af33c65e097eec155c", + "reference": "b4f1bffc8be79584836f70af33c65e097eec155c", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "CoreInterfaces\\": "src/" } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" ], - "description": "Utility classes and constants for use with PSR-7 (psr/http-message)", + "description": "Definition of the behavior of apimatic/core, apimatic/unirest-php and Apimatic's PHP SDK", + "homepage": "https://github.com/apimatic/core-interfaces-php", "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" + "apimatic", + "core", + "corelib", + "interface", + "php", + "unirest" ], "support": { - "issues": "https://github.com/php-fig/http-message-util/issues", - "source": "https://github.com/php-fig/http-message-util/tree/1.1.5" + "issues": "https://github.com/apimatic/core-interfaces-php/issues", + "source": "https://github.com/apimatic/core-interfaces-php/tree/0.1.5" }, - "time": "2020-11-24T22:02:12+00:00" + "time": "2024-05-09T06:32:07+00:00" }, { - "name": "graham-campbell/result-type", - "version": "v1.1.3", + "name": "apimatic/jsonmapper", + "version": "3.1.4", "source": { "type": "git", - "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "3ba905c11371512af9d9bdd27d99b782216b6945" + "url": "https://github.com/apimatic/jsonmapper.git", + "reference": "407b455d2adda2efa51a44b99400389fbee0394e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", - "reference": "3ba905c11371512af9d9bdd27d99b782216b6945", + "url": "https://api.github.com/repos/apimatic/jsonmapper/zipball/407b455d2adda2efa51a44b99400389fbee0394e", + "reference": "407b455d2adda2efa51a44b99400389fbee0394e", "shasum": "" }, "require": { - "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.3" + "ext-json": "*", + "php": "^5.6 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" + "phpunit/phpunit": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0", + "squizlabs/php_codesniffer": "^3.0.0" }, "type": "library", "autoload": { "psr-4": { - "GrahamCampbell\\ResultType\\": "src/" + "apimatic\\jsonmapper\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "OSL-3.0" ], "authors": [ { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" + "name": "Christian Weiske", + "email": "christian.weiske@netresearch.de", + "homepage": "http://www.netresearch.de/", + "role": "Developer" + }, + { + "name": "Mehdi Jaffery", + "email": "mehdi.jaffery@apimatic.io", + "homepage": "http://apimatic.io/", + "role": "Developer" } ], - "description": "An Implementation Of The Result Type", - "keywords": [ - "Graham Campbell", - "GrahamCampbell", - "Result Type", - "Result-Type", - "result" - ], + "description": "Map nested JSON structures onto PHP classes", "support": { - "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" + "email": "mehdi.jaffery@apimatic.io", + "issues": "https://github.com/apimatic/jsonmapper/issues", + "source": "https://github.com/apimatic/jsonmapper/tree/3.1.4" }, - "funding": [ + "time": "2024-06-11T11:48:30+00:00" + }, + { + "name": "apimatic/unirest-php", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/apimatic/unirest-php.git", + "reference": "e16754010c16be5473289470f129d87a0f41b55e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/apimatic/unirest-php/zipball/e16754010c16be5473289470f129d87a0f41b55e", + "reference": "e16754010c16be5473289470f129d87a0f41b55e", + "shasum": "" + }, + "require": { + "apimatic/core-interfaces": "^0.1.0", + "ext-curl": "*", + "ext-json": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "phan/phan": "5.4.2", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Unirest\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://github.com/GrahamCampbell", - "type": "github" + "name": "Mashape", + "email": "opensource@mashape.com", + "homepage": "https://www.mashape.com", + "role": "Developer" }, { - "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", - "type": "tidelift" + "name": "APIMATIC", + "email": "opensource@apimatic.io", + "homepage": "https://www.apimatic.io", + "role": "Developer" } ], - "time": "2024-07-20T21:45:45+00:00" + "description": "Unirest PHP", + "homepage": "https://github.com/apimatic/unirest-php", + "keywords": [ + "client", + "curl", + "http", + "https", + "rest" + ], + "support": { + "email": "opensource@apimatic.io", + "issues": "https://github.com/apimatic/unirest-php/issues", + "source": "https://github.com/apimatic/unirest-php/tree/4.0.5" + }, + "time": "2023-04-25T14:19:45+00:00" }, { "name": "guzzlehttp/guzzle", @@ -451,26 +549,27 @@ }, { "name": "laravel/serializable-closure", - "version": "v1.3.3", + "version": "v1.3.5", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "3dbf8a8e914634c48d389c1234552666b3d43754" + "reference": "1dc4a3dbfa2b7628a3114e43e32120cce7cdda9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/3dbf8a8e914634c48d389c1234552666b3d43754", - "reference": "3dbf8a8e914634c48d389c1234552666b3d43754", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/1dc4a3dbfa2b7628a3114e43e32120cce7cdda9c", + "reference": "1dc4a3dbfa2b7628a3114e43e32120cce7cdda9c", "shasum": "" }, "require": { "php": "^7.3|^8.0" }, "require-dev": { - "nesbot/carbon": "^2.61", + "illuminate/support": "^8.0|^9.0|^10.0|^11.0", + "nesbot/carbon": "^2.61|^3.0", "pestphp/pest": "^1.21.3", "phpstan/phpstan": "^1.8.2", - "symfony/var-dumper": "^5.4.11" + "symfony/var-dumper": "^5.4.11|^6.2.0|^7.0.0" }, "type": "library", "extra": { @@ -507,7 +606,7 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2023-11-08T14:08:06+00:00" + "time": "2024-09-23T13:33:08+00:00" }, { "name": "monolog/monolog", @@ -612,54 +711,47 @@ "time": "2024-04-12T20:52:51+00:00" }, { - "name": "nikic/fast-route", - "version": "v1.3.0", + "name": "paypal/paypal-server-sdk", + "version": "0.5.1", "source": { "type": "git", - "url": "https://github.com/nikic/FastRoute.git", - "reference": "181d480e08d9476e61381e04a71b34dc0432e812" + "url": "https://github.com/paypal/PayPal-PHP-Server-SDK.git", + "reference": "09148245f72f9dc2f6c8363b6206eac5effefa77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/FastRoute/zipball/181d480e08d9476e61381e04a71b34dc0432e812", - "reference": "181d480e08d9476e61381e04a71b34dc0432e812", + "url": "https://api.github.com/repos/paypal/PayPal-PHP-Server-SDK/zipball/09148245f72f9dc2f6c8363b6206eac5effefa77", + "reference": "09148245f72f9dc2f6c8363b6206eac5effefa77", "shasum": "" }, "require": { - "php": ">=5.4.0" + "apimatic/core": "~0.3.11", + "apimatic/core-interfaces": "~0.1.5", + "apimatic/unirest-php": "^4.0.0", + "ext-json": "*", + "php": "^7.2 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35|~5.7" + "phan/phan": "5.4.2", + "squizlabs/php_codesniffer": "^3.5" }, "type": "library", "autoload": { - "files": [ - "src/functions.php" - ], "psr-4": { - "FastRoute\\": "src/" + "PaypalServerSDKLib\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov", - "email": "nikic@php.net" - } - ], - "description": "Fast request router for PHP", - "keywords": [ - "router", - "routing" + "MIT" ], + "description": "PayPal's SDK for interacting with the REST APIs", + "homepage": "https://github.com/paypal/PayPal-PHP-Server-SDK", "support": { - "issues": "https://github.com/nikic/FastRoute/issues", - "source": "https://github.com/nikic/FastRoute/tree/master" + "issues": "https://github.com/paypal/PayPal-PHP-Server-SDK/issues", + "source": "https://github.com/paypal/PayPal-PHP-Server-SDK/tree/0.5.1" }, - "time": "2018-02-13T20:26:39+00:00" + "time": "2024-09-10T15:31:38+00:00" }, { "name": "php-di/invoker", @@ -835,79 +927,60 @@ "time": "2020-10-12T12:39:22+00:00" }, { - "name": "phpoption/phpoption", - "version": "1.9.3", + "name": "php-jsonpointer/php-jsonpointer", + "version": "v3.0.2", "source": { "type": "git", - "url": "https://github.com/schmittjoh/php-option.git", - "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" + "url": "https://github.com/raphaelstolt/php-jsonpointer.git", + "reference": "4428f86c6f23846e9faa5a420c4ef14e485b3afb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", - "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", + "url": "https://api.github.com/repos/raphaelstolt/php-jsonpointer/zipball/4428f86c6f23846e9faa5a420c4ef14e485b3afb", + "reference": "4428f86c6f23846e9faa5a420c4ef14e485b3afb", "shasum": "" }, "require": { - "php": "^7.2.5 || ^8.0" + "php": ">=5.4" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" + "friendsofphp/php-cs-fixer": "^1.11", + "phpunit/phpunit": "4.6.*" }, "type": "library", "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - }, "branch-alias": { - "dev-master": "1.9-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { - "psr-4": { - "PhpOption\\": "src/PhpOption/" + "psr-0": { + "Rs\\Json": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache-2.0" + "MIT" ], "authors": [ { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh" - }, - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" + "name": "Raphael Stolt", + "email": "raphael.stolt@gmail.com", + "homepage": "http://raphaelstolt.blogspot.com/" } ], - "description": "Option Type for PHP", + "description": "Implementation of JSON Pointer (http://tools.ietf.org/html/rfc6901)", + "homepage": "https://github.com/raphaelstolt/php-jsonpointer", "keywords": [ - "language", - "option", - "php", - "type" + "json", + "json pointer", + "json traversal" ], "support": { - "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" + "issues": "https://github.com/raphaelstolt/php-jsonpointer/issues", + "source": "https://github.com/raphaelstolt/php-jsonpointer/tree/master" }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", - "type": "tidelift" - } - ], - "time": "2024-07-20T21:41:07+00:00" + "time": "2016-08-29T08:51:01+00:00" }, { "name": "psr/container", @@ -1117,131 +1190,18 @@ }, "time": "2023-04-04T09:54:51+00:00" }, - { - "name": "psr/http-server-handler", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-server-handler.git", - "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/84c4fb66179be4caaf8e97bd239203245302e7d4", - "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "psr/http-message": "^1.0 || ^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP server-side request handler", - "keywords": [ - "handler", - "http", - "http-interop", - "psr", - "psr-15", - "psr-7", - "request", - "response", - "server" - ], - "support": { - "source": "https://github.com/php-fig/http-server-handler/tree/1.0.2" - }, - "time": "2023-04-10T20:06:20+00:00" - }, - { - "name": "psr/http-server-middleware", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-server-middleware.git", - "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/c1481f747daaa6a0782775cd6a8c26a1bf4a3829", - "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "psr/http-message": "^1.0 || ^2.0", - "psr/http-server-handler": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP server-side middleware", - "keywords": [ - "http", - "http-interop", - "middleware", - "psr", - "psr-15", - "psr-7", - "request", - "response" - ], - "support": { - "issues": "https://github.com/php-fig/http-server-middleware/issues", - "source": "https://github.com/php-fig/http-server-middleware/tree/1.0.2" - }, - "time": "2023-04-11T06:14:47+00:00" - }, { "name": "psr/log", - "version": "3.0.0", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", "shasum": "" }, "require": { @@ -1276,9 +1236,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/3.0.0" + "source": "https://github.com/php-fig/log/tree/3.0.2" }, - "time": "2021-07-14T16:46:02+00:00" + "time": "2024-09-11T13:17:53+00:00" }, { "name": "ralouphie/getallheaders", @@ -1325,369 +1285,45 @@ "time": "2019-03-08T08:55:37+00:00" }, { - "name": "slim/http", - "version": "1.4.0", + "name": "symfony/deprecation-contracts", + "version": "v3.5.0", "source": { "type": "git", - "url": "https://github.com/slimphp/Slim-Http.git", - "reference": "a8def7b8e9eabd0cdc21654ad4a82606942e066a" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim-Http/zipball/a8def7b8e9eabd0cdc21654ad4a82606942e066a", - "reference": "a8def7b8e9eabd0cdc21654ad4a82606942e066a", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", "shasum": "" }, "require": { - "ext-fileinfo": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-simplexml": "*", - "php": "^8.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.1 || ^2.0" - }, - "require-dev": { - "adriansuter/php-autoload-override": "^1.4", - "doctrine/instantiator": "^1.3.1", - "laminas/laminas-diactoros": "^3.1.0", - "nyholm/psr7": "^1.8.1", - "php-http/psr7-integration-tests": "^1.3.0", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^9.6", - "squizlabs/php_codesniffer": "^3.9" + "php": ">=8.1" }, "type": "library", - "autoload": { - "psr-4": { - "Slim\\Http\\": "src/" + "extra": { + "branch-alias": { + "dev-main": "3.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, + "autoload": { + "files": [ + "function.php" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { - "name": "Josh Lockhart", - "email": "hello@joshlockhart.com", - "homepage": "http://joshlockhart.com" - }, - { - "name": "Andrew Smith", - "email": "a.smith@silentworks.co.uk", - "homepage": "http://silentworks.co.uk" - }, - { - "name": "Rob Allen", - "email": "rob@akrabat.com", - "homepage": "http://akrabat.com" - }, - { - "name": "Pierre Berube", - "email": "pierre@lgse.com", - "homepage": "http://www.lgse.com" - } - ], - "description": "Slim PSR-7 Object Decorators", - "homepage": "http://slimframework.com", - "keywords": [ - "http", - "psr-7", - "psr7" - ], - "support": { - "issues": "https://github.com/slimphp/Slim-Http/issues", - "source": "https://github.com/slimphp/Slim-Http/tree/1.4.0" - }, - "time": "2024-06-24T18:27:41+00:00" - }, - { - "name": "slim/middleware", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/slimphp/Slim-Middleware.git", - "reference": "1190251a89a3044eda9d16dcb456dc92dba2d0c8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim-Middleware/zipball/1190251a89a3044eda9d16dcb456dc92dba2d0c8", - "reference": "1190251a89a3044eda9d16dcb456dc92dba2d0c8", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "slim/slim": ">=2.3.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "Slim": "./src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Josh Lockhart", - "email": "info@joshlockhart.com", - "homepage": "http://www.joshlockhart.com/" - } - ], - "description": "Slim Framework middleware", - "homepage": "http://github.com/codeguy/Slim", - "keywords": [ - "middleware", - "slim" - ], - "support": { - "issues": "https://github.com/slimphp/Slim-Middleware/issues", - "source": "https://github.com/slimphp/Slim-Middleware/tree/1.0.0" - }, - "abandoned": true, - "time": "2013-09-18T18:13:40+00:00" - }, - { - "name": "slim/psr7", - "version": "1.7.0", - "source": { - "type": "git", - "url": "https://github.com/slimphp/Slim-Psr7.git", - "reference": "753e9646def5ff4db1a06e5cf4ef539bfd30f467" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim-Psr7/zipball/753e9646def5ff4db1a06e5cf4ef539bfd30f467", - "reference": "753e9646def5ff4db1a06e5cf4ef539bfd30f467", - "shasum": "" - }, - "require": { - "fig/http-message-util": "^1.1.5", - "php": "^8.0", - "psr/http-factory": "^1.1", - "psr/http-message": "^1.0 || ^2.0", - "ralouphie/getallheaders": "^3.0", - "symfony/polyfill-php80": "^1.29" - }, - "provide": { - "psr/http-factory-implementation": "^1.0", - "psr/http-message-implementation": "^1.0 || ^2.0" - }, - "require-dev": { - "adriansuter/php-autoload-override": "^1.4", - "ext-json": "*", - "http-interop/http-factory-tests": "^1.1.0", - "php-http/psr7-integration-tests": "1.3.0", - "phpspec/prophecy": "^1.19", - "phpspec/prophecy-phpunit": "^2.2", - "phpstan/phpstan": "^1.11", - "phpunit/phpunit": "^9.6", - "squizlabs/php_codesniffer": "^3.10" - }, - "type": "library", - "autoload": { - "psr-4": { - "Slim\\Psr7\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Josh Lockhart", - "email": "hello@joshlockhart.com", - "homepage": "http://joshlockhart.com" - }, - { - "name": "Andrew Smith", - "email": "a.smith@silentworks.co.uk", - "homepage": "http://silentworks.co.uk" - }, - { - "name": "Rob Allen", - "email": "rob@akrabat.com", - "homepage": "http://akrabat.com" - }, - { - "name": "Pierre Berube", - "email": "pierre@lgse.com", - "homepage": "http://www.lgse.com" - } - ], - "description": "Strict PSR-7 implementation", - "homepage": "https://www.slimframework.com", - "keywords": [ - "http", - "psr-7", - "psr7" - ], - "support": { - "issues": "https://github.com/slimphp/Slim-Psr7/issues", - "source": "https://github.com/slimphp/Slim-Psr7/tree/1.7.0" - }, - "time": "2024-06-08T14:48:17+00:00" - }, - { - "name": "slim/slim", - "version": "4.14.0", - "source": { - "type": "git", - "url": "https://github.com/slimphp/Slim.git", - "reference": "5943393b88716eb9e82c4161caa956af63423913" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim/zipball/5943393b88716eb9e82c4161caa956af63423913", - "reference": "5943393b88716eb9e82c4161caa956af63423913", - "shasum": "" - }, - "require": { - "ext-json": "*", - "nikic/fast-route": "^1.3", - "php": "^7.4 || ^8.0", - "psr/container": "^1.0 || ^2.0", - "psr/http-factory": "^1.1", - "psr/http-message": "^1.1 || ^2.0", - "psr/http-server-handler": "^1.0", - "psr/http-server-middleware": "^1.0", - "psr/log": "^1.1 || ^2.0 || ^3.0" - }, - "require-dev": { - "adriansuter/php-autoload-override": "^1.4", - "ext-simplexml": "*", - "guzzlehttp/psr7": "^2.6", - "httpsoft/http-message": "^1.1", - "httpsoft/http-server-request": "^1.1", - "laminas/laminas-diactoros": "^2.17 || ^3", - "nyholm/psr7": "^1.8", - "nyholm/psr7-server": "^1.1", - "phpspec/prophecy": "^1.19", - "phpspec/prophecy-phpunit": "^2.1", - "phpstan/phpstan": "^1.11", - "phpunit/phpunit": "^9.6", - "slim/http": "^1.3", - "slim/psr7": "^1.6", - "squizlabs/php_codesniffer": "^3.10", - "vimeo/psalm": "^5.24" - }, - "suggest": { - "ext-simplexml": "Needed to support XML format in BodyParsingMiddleware", - "ext-xml": "Needed to support XML format in BodyParsingMiddleware", - "php-di/php-di": "PHP-DI is the recommended container library to be used with Slim", - "slim/psr7": "Slim PSR-7 implementation. See https://www.slimframework.com/docs/v4/start/installation.html for more information." - }, - "type": "library", - "autoload": { - "psr-4": { - "Slim\\": "Slim" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Josh Lockhart", - "email": "hello@joshlockhart.com", - "homepage": "https://joshlockhart.com" - }, - { - "name": "Andrew Smith", - "email": "a.smith@silentworks.co.uk", - "homepage": "http://silentworks.co.uk" - }, - { - "name": "Rob Allen", - "email": "rob@akrabat.com", - "homepage": "http://akrabat.com" - }, - { - "name": "Pierre Berube", - "email": "pierre@lgse.com", - "homepage": "http://www.lgse.com" - }, - { - "name": "Gabriel Manricks", - "email": "gmanricks@me.com", - "homepage": "http://gabrielmanricks.com" - } - ], - "description": "Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs", - "homepage": "https://www.slimframework.com", - "keywords": [ - "api", - "framework", - "micro", - "router" - ], - "support": { - "docs": "https://www.slimframework.com/docs/v4/", - "forum": "https://discourse.slimframework.com/", - "irc": "irc://irc.freenode.net:6667/slimphp", - "issues": "https://github.com/slimphp/Slim/issues", - "rss": "https://www.slimframework.com/blog/feed.rss", - "slack": "https://slimphp.slack.com/", - "source": "https://github.com/slimphp/Slim", - "wiki": "https://github.com/slimphp/Slim/wiki" - }, - "funding": [ - { - "url": "https://opencollective.com/slimphp", - "type": "open_collective" - }, - { - "url": "https://tidelift.com/funding/github/packagist/slim/slim", - "type": "tidelift" - } - ], - "time": "2024-06-13T08:54:48+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v3.5.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", @@ -1714,329 +1350,6 @@ } ], "time": "2024-04-18T09:32:20+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.30.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-05-31T15:07:36+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.30.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-06-19T12:30:46+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.30.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-05-31T15:07:36+00:00" - }, - { - "name": "vlucas/phpdotenv", - "version": "v5.6.1", - "source": { - "type": "git", - "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/a59a13791077fe3d44f90e7133eb68e7d22eaff2", - "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2", - "shasum": "" - }, - "require": { - "ext-pcre": "*", - "graham-campbell/result-type": "^1.1.3", - "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.3", - "symfony/polyfill-ctype": "^1.24", - "symfony/polyfill-mbstring": "^1.24", - "symfony/polyfill-php80": "^1.24" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "ext-filter": "*", - "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" - }, - "suggest": { - "ext-filter": "Required to use the boolean validator." - }, - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - }, - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Dotenv\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Vance Lucas", - "email": "vance@vancelucas.com", - "homepage": "https://github.com/vlucas" - } - ], - "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", - "keywords": [ - "dotenv", - "env", - "environment" - ], - "support": { - "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", - "type": "tidelift" - } - ], - "time": "2024-07-20T21:52:34+00:00" } ], "packages-dev": [ @@ -2278,16 +1591,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.1.0", + "version": "v5.2.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1" + "reference": "23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/683130c2ff8c2739f4822ff7ac5c873ec529abd1", - "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb", + "reference": "23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb", "shasum": "" }, "require": { @@ -2330,9 +1643,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.1.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.2.0" }, - "time": "2024-07-01T20:03:41+00:00" + "time": "2024-09-15T16:40:33+00:00" }, { "name": "phar-io/manifest", @@ -2750,22 +2063,22 @@ }, { "name": "phpstan/extension-installer", - "version": "1.4.1", + "version": "1.4.3", "source": { "type": "git", "url": "https://github.com/phpstan/extension-installer.git", - "reference": "f6b87faf9fc7978eab2f7919a8760bc9f58f9203" + "reference": "85e90b3942d06b2326fba0403ec24fe912372936" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/f6b87faf9fc7978eab2f7919a8760bc9f58f9203", - "reference": "f6b87faf9fc7978eab2f7919a8760bc9f58f9203", + "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/85e90b3942d06b2326fba0403ec24fe912372936", + "reference": "85e90b3942d06b2326fba0403ec24fe912372936", "shasum": "" }, "require": { "composer-plugin-api": "^2.0", "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.9.0" + "phpstan/phpstan": "^1.9.0 || ^2.0" }, "require-dev": { "composer/composer": "^2.0", @@ -2786,24 +2099,28 @@ "MIT" ], "description": "Composer plugin for automatic installation of PHPStan extensions", + "keywords": [ + "dev", + "static analysis" + ], "support": { "issues": "https://github.com/phpstan/extension-installer/issues", - "source": "https://github.com/phpstan/extension-installer/tree/1.4.1" + "source": "https://github.com/phpstan/extension-installer/tree/1.4.3" }, - "time": "2024-06-10T08:20:49+00:00" + "time": "2024-09-04T20:21:43+00:00" }, { "name": "phpstan/phpdoc-parser", - "version": "1.29.1", + "version": "1.31.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4" + "reference": "249f15fb843bf240cf058372dad29e100cee6c17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fcaefacf2d5c417e928405b71b400d4ce10daaf4", - "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/249f15fb843bf240cf058372dad29e100cee6c17", + "reference": "249f15fb843bf240cf058372dad29e100cee6c17", "shasum": "" }, "require": { @@ -2835,22 +2152,22 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.31.0" }, - "time": "2024-05-31T08:52:43+00:00" + "time": "2024-09-22T11:32:18+00:00" }, { "name": "phpstan/phpstan", - "version": "1.11.8", + "version": "1.12.4", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec" + "reference": "ffa517cb918591b93acc9b95c0bebdcd0e4538bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec", - "reference": "6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ffa517cb918591b93acc9b95c0bebdcd0e4538bd", + "reference": "ffa517cb918591b93acc9b95c0bebdcd0e4538bd", "shasum": "" }, "require": { @@ -2895,39 +2212,39 @@ "type": "github" } ], - "time": "2024-07-24T07:01:22+00:00" + "time": "2024-09-19T07:58:01+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.31", + "version": "9.2.32", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965" + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.18 || ^5.0", + "nikic/php-parser": "^4.19.1 || ^5.1.0", "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-text-template": "^2.0.4", + "sebastian/code-unit-reverse-lookup": "^2.0.3", + "sebastian/complexity": "^2.0.3", + "sebastian/environment": "^5.1.5", + "sebastian/lines-of-code": "^1.0.4", + "sebastian/version": "^3.0.2", + "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.6" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -2936,7 +2253,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "9.2.x-dev" } }, "autoload": { @@ -2965,7 +2282,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" }, "funding": [ { @@ -2973,7 +2290,7 @@ "type": "github" } ], - "time": "2024-03-02T06:37:42+00:00" + "time": "2024-08-22T04:23:01+00:00" }, { "name": "phpunit/php-file-iterator", @@ -3218,16 +2535,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.20", + "version": "9.6.21", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "49d7820565836236411f5dc002d16dd689cde42f" + "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/49d7820565836236411f5dc002d16dd689cde42f", - "reference": "49d7820565836236411f5dc002d16dd689cde42f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", + "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", "shasum": "" }, "require": { @@ -3242,7 +2559,7 @@ "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.31", + "phpunit/php-code-coverage": "^9.2.32", "phpunit/php-file-iterator": "^3.0.6", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.4", @@ -3301,7 +2618,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.20" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.21" }, "funding": [ { @@ -3317,7 +2634,7 @@ "type": "tidelift" } ], - "time": "2024-07-10T11:45:39+00:00" + "time": "2024-09-19T10:50:18+00:00" }, { "name": "sebastian/cli-parser", @@ -4284,16 +3601,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.10.2", + "version": "3.10.3", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017" + "reference": "62d32998e820bddc40f99f8251958aed187a5c9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/86e5f5dd9a840c46810ebe5ff1885581c42a3017", - "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/62d32998e820bddc40f99f8251958aed187a5c9c", + "reference": "62d32998e820bddc40f99f8251958aed187a5c9c", "shasum": "" }, "require": { @@ -4360,7 +3677,7 @@ "type": "open_collective" } ], - "time": "2024-07-21T23:26:44+00:00" + "time": "2024-09-18T10:38:58+00:00" }, { "name": "theseer/tokenizer", diff --git a/standard-integration/server/php/server/index.php b/standard-integration/server/php/server/index.php index 81a25ada..21ba1ec8 100644 --- a/standard-integration/server/php/server/index.php +++ b/standard-integration/server/php/server/index.php @@ -1,107 +1,83 @@ false]); - $response = $client->post("$base/v1/oauth2/token", [ - 'form_params' => [ - 'grant_type' => 'client_credentials' - ], - 'headers' => [ - 'Authorization' => "Basic $auth" - ] - ]); - - $data = json_decode($response->getBody(), true); - return $data['access_token']; -} +$client = PaypalServerSDKClientBuilder::init() + ->clientCredentialsAuthCredentials( + ClientCredentialsAuthCredentialsBuilder::init( + $PAYPAL_CLIENT_ID, + $PAYPAL_CLIENT_SECRET + ) + ) + ->environment(Environment::SANDBOX) + ->build(); /** * Create an order to start the transaction. * @see https://developer.paypal.com/docs/api/orders/v2/#orders_create */ -function createOrder($cart) { - global $base; - - $accessToken = generateAccessToken(); - - // Disabling certificate validation for local development - $client = new Client(['verify' => false]); - $payload = [ - 'intent' => 'CAPTURE', - 'purchase_units' => [ +function createOrder($cart) +{ + global $client; + + $orderBody = [ + 'body' => OrderRequestBuilder::init( + CheckoutPaymentIntent::CAPTURE, [ - 'amount' => [ - 'currency_code' => 'USD', - 'value' => '100.00' - ] + PurchaseUnitRequestBuilder::init( + AmountWithBreakdownBuilder::init( + 'USD', + '100.00' + )->build() + )->build() ] - ], + )->build() ]; - $response = $client->post("$base/v2/checkout/orders", [ - 'headers' => [ - 'Content-Type' => 'application/json', - 'Authorization' => "Bearer $accessToken" - ], - 'json' => $payload - ]); + $apiResponse = $client->getOrdersController()->ordersCreate($orderBody); - return handleResponse($response); + return handleResponse($apiResponse); } /** * Capture payment for the created order to complete the transaction. * @see https://developer.paypal.com/docs/api/orders/v2/#orders_capture */ -function captureOrder($orderID) { - global $base; +function captureOrder($orderID) +{ + global $client; - $accessToken = generateAccessToken(); + $captureBody = [ + 'id' => $orderID + ]; - // Disabling certificate validation for local development - $client = new Client(['verify' => false]); - $response = $client->post("$base/v2/checkout/orders/$orderID/capture", [ - 'headers' => [ - 'Content-Type' => 'application/json', - 'Authorization' => "Bearer $accessToken" - ] - ]); + $apiResponse = $client->getOrdersController()->ordersCapture($captureBody); - return handleResponse($response); + return handleResponse($apiResponse); } -function handleResponse($response) { - $jsonResponse = json_decode($response->getBody(), true); +function handleResponse($response) +{ return [ - 'jsonResponse' => $jsonResponse, + 'jsonResponse' => $response->getResult(), 'httpStatusCode' => $response->getStatusCode() ]; } $endpoint = $_SERVER['REQUEST_URI']; -if($endpoint === '/') { +if ($endpoint === '/') { try { $response = [ "message" => "Server is running" @@ -114,7 +90,7 @@ function handleResponse($response) { } } -if($endpoint === '/api/orders') { +if ($endpoint === '/api/orders') { $data = json_decode(file_get_contents('php://input'), true); $cart = $data['cart']; header('Content-Type: application/json'); @@ -128,7 +104,7 @@ function handleResponse($response) { } -if(str_ends_with($endpoint, '/capture')) { +if (str_ends_with($endpoint, '/capture')) { $urlSegments = explode('/', $endpoint); end($urlSegments); // Will set the pointer to the end of array $orderID = prev($urlSegments); From 9260f0ce742a8fbb339d4d25b51ea56caa88df33 Mon Sep 17 00:00:00 2001 From: sourav sarkar Date: Wed, 25 Sep 2024 09:58:24 +0530 Subject: [PATCH 08/18] Feature/node updates (#3) * docs: update docs to use the server/client name convention * updated nodejs with server sdk * updating orders api Co-authored-by: Sourav Sarkar Co-authored-by: Neha Sharma --- .gitignore | 2 +- advanced-integration/v2/server/node/.env | 5 + .../v2/server/node/package.json | 2 + .../v2/server/node/server/server.js | 175 ++++++++---------- .../v2/server/php/server/index.php | 2 +- .../server/php/server/index.php | 2 +- 6 files changed, 86 insertions(+), 102 deletions(-) create mode 100644 advanced-integration/v2/server/node/.env diff --git a/.gitignore b/.gitignore index de7d8b22..2caf82db 100644 --- a/.gitignore +++ b/.gitignore @@ -103,4 +103,4 @@ dist # dotnet *.sln -*.local \ No newline at end of file +*.local diff --git a/advanced-integration/v2/server/node/.env b/advanced-integration/v2/server/node/.env new file mode 100644 index 00000000..2251fbbb --- /dev/null +++ b/advanced-integration/v2/server/node/.env @@ -0,0 +1,5 @@ +# Create an application to obtain credentials at +# https://developer.paypal.com/dashboard/applications/sandbox + +PAYPAL_CLIENT_ID=YOUR_CLIENT_ID_GOES_HERE +PAYPAL_CLIENT_SECRET=YOUR_SECRET_GOES_HERE diff --git a/advanced-integration/v2/server/node/package.json b/advanced-integration/v2/server/node/package.json index f24544de..fa0a49aa 100644 --- a/advanced-integration/v2/server/node/package.json +++ b/advanced-integration/v2/server/node/package.json @@ -4,6 +4,8 @@ "private": true, "type": "module", "dependencies": { + "@paypal/paypal-server-sdk": "^0.5.1", + "body-parser": "^1.20.3", "dotenv": "^16.3.1", "express": "^4.18.2", "node-fetch": "^3.3.2" diff --git a/advanced-integration/v2/server/node/server/server.js b/advanced-integration/v2/server/node/server/server.js index 1e2f9d4a..3e860b31 100644 --- a/advanced-integration/v2/server/node/server/server.js +++ b/advanced-integration/v2/server/node/server/server.js @@ -1,81 +1,77 @@ import express from "express"; -import fetch from "node-fetch"; import "dotenv/config"; +import { + ApiError, + CheckoutPaymentIntent, + Client, + Environment, + LogLevel, + OrdersController, +} from '@paypal/paypal-server-sdk'; +import bodyParser from "body-parser"; -const { PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PORT = 8080 } = process.env; -const base = "https://api-m.sandbox.paypal.com"; const app = express(); +app.use(bodyParser.json()); -// parse post params sent in body in json format -app.use(express.json()); +const { PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PORT = 8080 } = process.env; -/** - * Generate an OAuth 2.0 access token for authenticating with PayPal REST APIs. - * @see https://developer.paypal.com/api/rest/authentication/ - */ -const generateAccessToken = async () => { - try { - if (!PAYPAL_CLIENT_ID || !PAYPAL_CLIENT_SECRET) { - throw new Error("MISSING_API_CREDENTIALS"); +const client = new Client({ + clientCredentialsAuthCredentials: { + oAuthClientId: PAYPAL_CLIENT_ID, + oAuthClientSecret: PAYPAL_CLIENT_SECRET + }, + timeout: 0, + environment: Environment.Sandbox, + logging: { + logLevel: LogLevel.Info, + logRequest: { + logBody: true + }, + logResponse: { + logHeaders: true } - const auth = Buffer.from( - PAYPAL_CLIENT_ID + ":" + PAYPAL_CLIENT_SECRET, - ).toString("base64"); - const response = await fetch(`${base}/v1/oauth2/token`, { - method: "POST", - body: "grant_type=client_credentials", - headers: { - Authorization: `Basic ${auth}`, - }, - }); + }, +}); - const data = await response.json(); - return data.access_token; - } catch (error) { - console.error("Failed to generate Access Token:", error); - } -}; +const ordersController = new OrdersController(client); /** * Create an order to start the transaction. * @see https://developer.paypal.com/docs/api/orders/v2/#orders_create */ const createOrder = async (cart) => { - // use the cart information passed from the front-end to calculate the purchase unit details - console.log( - "shopping cart information passed from the frontend createOrder() callback:", - cart, - ); - - const accessToken = await generateAccessToken(); - const url = `${base}/v2/checkout/orders`; - const payload = { - intent: "CAPTURE", - purchase_units: [ - { - amount: { - currency_code: "USD", - value: "100.00", - }, - }, - ], - }; - - const response = await fetch(url, { - headers: { - "Content-Type": "application/json", - Authorization: `Bearer ${accessToken}`, - // Uncomment one of these to force an error for negative testing (in sandbox mode only). Documentation: - // https://developer.paypal.com/tools/sandbox/negative-testing/request-headers/ - // "PayPal-Mock-Response": '{"mock_application_codes": "MISSING_REQUIRED_PARAMETER"}' - // "PayPal-Mock-Response": '{"mock_application_codes": "PERMISSION_DENIED"}' - // "PayPal-Mock-Response": '{"mock_application_codes": "INTERNAL_SERVER_ERROR"}' + const collect = { + body: { + intent: CheckoutPaymentIntent.CAPTURE, + purchaseUnits: [ + { + amount: { + currencyCode: 'USD', + value: '100.00', + }, + } + ], }, - method: "POST", - body: JSON.stringify(payload), - }); + prefer: 'return=minimal' + } + + try { + const { result, ...httpResponse } = await ordersController.ordersCreate(collect); + // Get more response info... + // const { statusCode, headers } = httpResponse; + return { + jsonResponse: result, + httpStatusCode: httpResponse.statusCode, + }; + } catch (error) { + if (error instanceof ApiError) { + const errors = error.result; + // const { statusCode, headers } = error; + const errorMessage = await errors; + throw new Error(errorMessage); + } + } - return handleResponse(response); }; /** @@ -83,37 +79,29 @@ const createOrder = async (cart) => { * @see https://developer.paypal.com/docs/api/orders/v2/#orders_capture */ const captureOrder = async (orderID) => { - const accessToken = await generateAccessToken(); - const url = `${base}/v2/checkout/orders/${orderID}/capture`; - - const response = await fetch(url, { - method: "POST", - headers: { - "Content-Type": "application/json", - Authorization: `Bearer ${accessToken}`, - // Uncomment one of these to force an error for negative testing (in sandbox mode only). Documentation: - // https://developer.paypal.com/tools/sandbox/negative-testing/request-headers/ - // "PayPal-Mock-Response": '{"mock_application_codes": "INSTRUMENT_DECLINED"}' - // "PayPal-Mock-Response": '{"mock_application_codes": "TRANSACTION_REFUSED"}' - // "PayPal-Mock-Response": '{"mock_application_codes": "INTERNAL_SERVER_ERROR"}' - }, - }); - - return handleResponse(response); -}; - -async function handleResponse(response) { + + const collect = { + id: orderID, + prefer: 'return=minimal' + } + try { - const jsonResponse = await response.json(); + const { result, ...httpResponse } = await ordersController.ordersCapture(collect); + // Get more response info... + // const { statusCode, headers } = httpResponse; return { - jsonResponse, - httpStatusCode: response.status, + jsonResponse: result, + httpStatusCode: httpResponse.statusCode, }; - } catch (err) { - const errorMessage = await response.text(); + } catch (error) { + if (error instanceof ApiError) { + const errors = error.result; + // const { statusCode, headers } = error; + const errorMessage = await errors; throw new Error(errorMessage); + } } -} +}; app.post("/api/orders", async (req, res) => { try { @@ -138,17 +126,6 @@ app.post("/api/orders/:orderID/capture", async (req, res) => { } }); -// render checkout page with client id & unique client token -app.get("/", async (req, res) => { - try { - res.render("checkout", { - clientId: PAYPAL_CLIENT_ID, - }); - } catch (err) { - res.status(500).send(err.message); - } -}); - app.listen(PORT, () => { console.log(`Node server listening at http://localhost:${PORT}/`); }); diff --git a/advanced-integration/v2/server/php/server/index.php b/advanced-integration/v2/server/php/server/index.php index 21ba1ec8..ef6b43fb 100644 --- a/advanced-integration/v2/server/php/server/index.php +++ b/advanced-integration/v2/server/php/server/index.php @@ -117,4 +117,4 @@ function handleResponse($response) http_response_code(500); } } -?> \ No newline at end of file +?> diff --git a/standard-integration/server/php/server/index.php b/standard-integration/server/php/server/index.php index 21ba1ec8..ef6b43fb 100644 --- a/standard-integration/server/php/server/index.php +++ b/standard-integration/server/php/server/index.php @@ -117,4 +117,4 @@ function handleResponse($response) http_response_code(500); } } -?> \ No newline at end of file +?> From b94c66b5f43fa21c6b563e08e1727d339118c9d5 Mon Sep 17 00:00:00 2001 From: sourav sarkar Date: Wed, 25 Sep 2024 11:26:01 +0530 Subject: [PATCH 09/18] Feature/node updates (#4) * updated error handling --------- Co-authored-by: Sourav Sarkar Co-authored-by: Neha Sharma --- .../v2/server/node/server/server.js | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/advanced-integration/v2/server/node/server/server.js b/advanced-integration/v2/server/node/server/server.js index 3e860b31..44678d2e 100644 --- a/advanced-integration/v2/server/node/server/server.js +++ b/advanced-integration/v2/server/node/server/server.js @@ -56,22 +56,19 @@ const createOrder = async (cart) => { } try { - const { result, ...httpResponse } = await ordersController.ordersCreate(collect); + const { body, ...httpResponse } = await ordersController.ordersCreate(collect); // Get more response info... // const { statusCode, headers } = httpResponse; return { - jsonResponse: result, + jsonResponse: JSON.parse(body), httpStatusCode: httpResponse.statusCode, }; } catch (error) { if (error instanceof ApiError) { - const errors = error.result; // const { statusCode, headers } = error; - const errorMessage = await errors; - throw new Error(errorMessage); + throw new Error(error.message); } } - }; /** @@ -86,19 +83,17 @@ const captureOrder = async (orderID) => { } try { - const { result, ...httpResponse } = await ordersController.ordersCapture(collect); + const { body, ...httpResponse } = await ordersController.ordersCapture(collect); // Get more response info... // const { statusCode, headers } = httpResponse; return { - jsonResponse: result, + jsonResponse: JSON.parse(body), httpStatusCode: httpResponse.statusCode, }; } catch (error) { if (error instanceof ApiError) { - const errors = error.result; // const { statusCode, headers } = error; - const errorMessage = await errors; - throw new Error(errorMessage); + throw new Error(error.message); } } }; From c5d72dd245e142333443754b5d79b1d8a573bdfe Mon Sep 17 00:00:00 2001 From: Sourav Sarkar Date: Wed, 25 Sep 2024 11:31:13 +0530 Subject: [PATCH 10/18] feat: add nodejs to standard-integration --- advanced-integration/v2/server/node/.env | 5 - .../v2/server/node/server/server.js | 39 +-- standard-integration/server/node/package.json | 2 + .../server/node/server/server.js | 286 ++++++++++++------ 4 files changed, 215 insertions(+), 117 deletions(-) delete mode 100644 advanced-integration/v2/server/node/.env diff --git a/advanced-integration/v2/server/node/.env b/advanced-integration/v2/server/node/.env deleted file mode 100644 index 2251fbbb..00000000 --- a/advanced-integration/v2/server/node/.env +++ /dev/null @@ -1,5 +0,0 @@ -# Create an application to obtain credentials at -# https://developer.paypal.com/dashboard/applications/sandbox - -PAYPAL_CLIENT_ID=YOUR_CLIENT_ID_GOES_HERE -PAYPAL_CLIENT_SECRET=YOUR_SECRET_GOES_HERE diff --git a/advanced-integration/v2/server/node/server/server.js b/advanced-integration/v2/server/node/server/server.js index 44678d2e..08aadad1 100644 --- a/advanced-integration/v2/server/node/server/server.js +++ b/advanced-integration/v2/server/node/server/server.js @@ -7,7 +7,7 @@ import { Environment, LogLevel, OrdersController, -} from '@paypal/paypal-server-sdk'; +} from "@paypal/paypal-server-sdk"; import bodyParser from "body-parser"; const app = express(); @@ -18,18 +18,18 @@ const { PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PORT = 8080 } = process.env; const client = new Client({ clientCredentialsAuthCredentials: { oAuthClientId: PAYPAL_CLIENT_ID, - oAuthClientSecret: PAYPAL_CLIENT_SECRET + oAuthClientSecret: PAYPAL_CLIENT_SECRET, }, timeout: 0, environment: Environment.Sandbox, logging: { logLevel: LogLevel.Info, logRequest: { - logBody: true + logBody: true, }, logResponse: { - logHeaders: true - } + logHeaders: true, + }, }, }); @@ -46,17 +46,18 @@ const createOrder = async (cart) => { purchaseUnits: [ { amount: { - currencyCode: 'USD', - value: '100.00', + currencyCode: "USD", + value: "100.00", }, - } + }, ], }, - prefer: 'return=minimal' - } - + prefer: "return=minimal", + }; + try { - const { body, ...httpResponse } = await ordersController.ordersCreate(collect); + const { body, ...httpResponse } = + await ordersController.ordersCreate(collect); // Get more response info... // const { statusCode, headers } = httpResponse; return { @@ -66,7 +67,7 @@ const createOrder = async (cart) => { } catch (error) { if (error instanceof ApiError) { // const { statusCode, headers } = error; - throw new Error(error.message); + throw new Error(error.message); } } }; @@ -76,14 +77,14 @@ const createOrder = async (cart) => { * @see https://developer.paypal.com/docs/api/orders/v2/#orders_capture */ const captureOrder = async (orderID) => { - const collect = { id: orderID, - prefer: 'return=minimal' - } - + prefer: "return=minimal", + }; + try { - const { body, ...httpResponse } = await ordersController.ordersCapture(collect); + const { body, ...httpResponse } = + await ordersController.ordersCapture(collect); // Get more response info... // const { statusCode, headers } = httpResponse; return { @@ -93,7 +94,7 @@ const captureOrder = async (orderID) => { } catch (error) { if (error instanceof ApiError) { // const { statusCode, headers } = error; - throw new Error(error.message); + throw new Error(error.message); } } }; diff --git a/standard-integration/server/node/package.json b/standard-integration/server/node/package.json index 006a766d..224be3a2 100644 --- a/standard-integration/server/node/package.json +++ b/standard-integration/server/node/package.json @@ -4,6 +4,8 @@ "private": true, "type": "module", "dependencies": { + "@paypal/paypal-server-sdk": "^0.5.1", + "body-parser": "^1.20.3", "dotenv": "^16.3.1", "express": "^4.18.2", "node-fetch": "^3.3.2" diff --git a/standard-integration/server/node/server/server.js b/standard-integration/server/node/server/server.js index 1e2f9d4a..94f37c28 100644 --- a/standard-integration/server/node/server/server.js +++ b/standard-integration/server/node/server/server.js @@ -1,81 +1,202 @@ import express from "express"; -import fetch from "node-fetch"; import "dotenv/config"; +import { + ApiError, + CheckoutPaymentIntent, + Client, + Environment, + LogLevel, + OrdersController, +} from "@paypal/paypal-server-sdk"; +import bodyParser from "body-parser"; -const { PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PORT = 8080 } = process.env; -const base = "https://api-m.sandbox.paypal.com"; const app = express(); +app.use(bodyParser.json()); + +const { PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PORT = 8080 } = process.env; + +const client = new Client({ + clientCredentialsAuthCredentials: { + oAuthClientId: PAYPAL_CLIENT_ID, + oAuthClientSecret: PAYPAL_CLIENT_SECRET, + }, + timeout: 0, + environment: Environment.Sandbox, + logging: { + logLevel: LogLevel.Info, + logRequest: { + logBody: true, + }, + logResponse: { + logHeaders: true, + }, + }, +}); -// parse post params sent in body in json format -app.use(express.json()); +const ordersController = new OrdersController(client); /** - * Generate an OAuth 2.0 access token for authenticating with PayPal REST APIs. - * @see https://developer.paypal.com/api/rest/authentication/ + * Create an order to start the transaction. + * @see https://developer.paypal.com/docs/api/orders/v2/#orders_create */ -const generateAccessToken = async () => { +const createOrder = async (cart) => { + const collect = { + body: { + intent: CheckoutPaymentIntent.CAPTURE, + purchaseUnits: [ + { + amount: { + currencyCode: "USD", + value: "100.00", + }, + }, + ], + }, + prefer: "return=minimal", + }; + try { - if (!PAYPAL_CLIENT_ID || !PAYPAL_CLIENT_SECRET) { - throw new Error("MISSING_API_CREDENTIALS"); + const { body, ...httpResponse } = + await ordersController.ordersCreate(collect); + // Get more response info... + // const { statusCode, headers } = httpResponse; + return { + jsonResponse: JSON.parse(body), + httpStatusCode: httpResponse.statusCode, + }; + } catch (error) { + if (error instanceof ApiError) { + // const { statusCode, headers } = error; + throw new Error(error.message); } - const auth = Buffer.from( - PAYPAL_CLIENT_ID + ":" + PAYPAL_CLIENT_SECRET, - ).toString("base64"); - const response = await fetch(`${base}/v1/oauth2/token`, { - method: "POST", - body: "grant_type=client_credentials", - headers: { - Authorization: `Basic ${auth}`, - }, - }); - - const data = await response.json(); - return data.access_token; + } +}; + +/** + * Capture payment for the created order to complete the transaction. + * @see https://developer.paypal.com/docs/api/orders/v2/#orders_capture + */ +const captureOrder = async (orderID) => { + const collect = { + id: orderID, + prefer: "return=minimal", + }; + + try { + const { body, ...httpResponse } = + await ordersController.ordersCapture(collect); + // Get more response info... + // const { statusCode, headers } = httpResponse; + return { + jsonResponse: JSON.parse(body), + httpStatusCode: httpResponse.statusCode, + }; } catch (error) { - console.error("Failed to generate Access Token:", error); + if (error instanceof ApiError) { + // const { statusCode, headers } = error; + throw new Error(error.message); + } } }; +app.post("/api/orders", async (req, res) => { + try { + // use the cart information passed from the front-end to calculate the order amount detals + const { cart } = req.body; + const { jsonResponse, httpStatusCode } = await createOrder(cart); + res.status(httpStatusCode).json(jsonResponse); + } catch (error) { + console.error("Failed to create order:", error); + res.status(500).json({ error: "Failed to create order." }); + } +}); + +app.post("/api/orders/:orderID/capture", async (req, res) => { + try { + const { orderID } = req.params; + const { jsonResponse, httpStatusCode } = await captureOrder(orderID); + res.status(httpStatusCode).json(jsonResponse); + } catch (error) { + console.error("Failed to create order:", error); + res.status(500).json({ error: "Failed to capture order." }); + } +}); + +app.listen(PORT, () => { + console.log(`Node server listening at http://localhost:${PORT}/`); +}); +import express from "express"; +import "dotenv/config"; +import { + ApiError, + CheckoutPaymentIntent, + Client, + Environment, + LogLevel, + OrdersController, +} from "@paypal/paypal-server-sdk"; +import bodyParser from "body-parser"; + +const app = express(); +app.use(bodyParser.json()); + +const { PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PORT = 8080 } = process.env; + +const client = new Client({ + clientCredentialsAuthCredentials: { + oAuthClientId: PAYPAL_CLIENT_ID, + oAuthClientSecret: PAYPAL_CLIENT_SECRET, + }, + timeout: 0, + environment: Environment.Sandbox, + logging: { + logLevel: LogLevel.Info, + logRequest: { + logBody: true, + }, + logResponse: { + logHeaders: true, + }, + }, +}); + +const ordersController = new OrdersController(client); + /** * Create an order to start the transaction. * @see https://developer.paypal.com/docs/api/orders/v2/#orders_create */ const createOrder = async (cart) => { - // use the cart information passed from the front-end to calculate the purchase unit details - console.log( - "shopping cart information passed from the frontend createOrder() callback:", - cart, - ); - - const accessToken = await generateAccessToken(); - const url = `${base}/v2/checkout/orders`; - const payload = { - intent: "CAPTURE", - purchase_units: [ - { - amount: { - currency_code: "USD", - value: "100.00", + const collect = { + body: { + intent: CheckoutPaymentIntent.CAPTURE, + purchaseUnits: [ + { + amount: { + currencyCode: "USD", + value: "100.00", + }, }, - }, - ], - }; - - const response = await fetch(url, { - headers: { - "Content-Type": "application/json", - Authorization: `Bearer ${accessToken}`, - // Uncomment one of these to force an error for negative testing (in sandbox mode only). Documentation: - // https://developer.paypal.com/tools/sandbox/negative-testing/request-headers/ - // "PayPal-Mock-Response": '{"mock_application_codes": "MISSING_REQUIRED_PARAMETER"}' - // "PayPal-Mock-Response": '{"mock_application_codes": "PERMISSION_DENIED"}' - // "PayPal-Mock-Response": '{"mock_application_codes": "INTERNAL_SERVER_ERROR"}' + ], }, - method: "POST", - body: JSON.stringify(payload), - }); + prefer: "return=minimal", + }; - return handleResponse(response); + try { + const { body, ...httpResponse } = + await ordersController.ordersCreate(collect); + // Get more response info... + // const { statusCode, headers } = httpResponse; + return { + jsonResponse: JSON.parse(body), + httpStatusCode: httpResponse.statusCode, + }; + } catch (error) { + if (error instanceof ApiError) { + // const { statusCode, headers } = error; + throw new Error(error.message); + } + } }; /** @@ -83,37 +204,27 @@ const createOrder = async (cart) => { * @see https://developer.paypal.com/docs/api/orders/v2/#orders_capture */ const captureOrder = async (orderID) => { - const accessToken = await generateAccessToken(); - const url = `${base}/v2/checkout/orders/${orderID}/capture`; - - const response = await fetch(url, { - method: "POST", - headers: { - "Content-Type": "application/json", - Authorization: `Bearer ${accessToken}`, - // Uncomment one of these to force an error for negative testing (in sandbox mode only). Documentation: - // https://developer.paypal.com/tools/sandbox/negative-testing/request-headers/ - // "PayPal-Mock-Response": '{"mock_application_codes": "INSTRUMENT_DECLINED"}' - // "PayPal-Mock-Response": '{"mock_application_codes": "TRANSACTION_REFUSED"}' - // "PayPal-Mock-Response": '{"mock_application_codes": "INTERNAL_SERVER_ERROR"}' - }, - }); - - return handleResponse(response); -}; + const collect = { + id: orderID, + prefer: "return=minimal", + }; -async function handleResponse(response) { try { - const jsonResponse = await response.json(); + const { body, ...httpResponse } = + await ordersController.ordersCapture(collect); + // Get more response info... + // const { statusCode, headers } = httpResponse; return { - jsonResponse, - httpStatusCode: response.status, + jsonResponse: JSON.parse(body), + httpStatusCode: httpResponse.statusCode, }; - } catch (err) { - const errorMessage = await response.text(); - throw new Error(errorMessage); + } catch (error) { + if (error instanceof ApiError) { + // const { statusCode, headers } = error; + throw new Error(error.message); + } } -} +}; app.post("/api/orders", async (req, res) => { try { @@ -138,17 +249,6 @@ app.post("/api/orders/:orderID/capture", async (req, res) => { } }); -// render checkout page with client id & unique client token -app.get("/", async (req, res) => { - try { - res.render("checkout", { - clientId: PAYPAL_CLIENT_ID, - }); - } catch (err) { - res.status(500).send(err.message); - } -}); - app.listen(PORT, () => { console.log(`Node server listening at http://localhost:${PORT}/`); }); From 2c91bf2bf709a03f914f9ae1b39161679ac9c215 Mon Sep 17 00:00:00 2001 From: Rekhaa Date: Thu, 26 Sep 2024 15:16:49 -0700 Subject: [PATCH 11/18] change devcontainer names --- .../advanced-integration-v1/devcontainer.json | 2 +- .../devcontainer.json | 2 +- .../devcontainer.json | 2 +- .../devcontainer.json | 2 +- .../devcontainer.json | 2 +- .../devcontainer.json | 2 +- .../devcontainer.json | 2 +- .../devcontainer.json | 2 +- .../devcontainer.json | 2 +- .../advanced-integration-v2/devcontainer.json | 44 ------------------- .../welcome-message.sh | 23 ---------- .../save-payment-method/devcontainer.json | 2 +- .../standard-integration/devcontainer.json | 44 ------------------- .../standard-integration/welcome-message.sh | 23 ---------- 14 files changed, 10 insertions(+), 144 deletions(-) delete mode 100644 .devcontainer/advanced-integration-v2/devcontainer.json delete mode 100644 .devcontainer/advanced-integration-v2/welcome-message.sh delete mode 100644 .devcontainer/standard-integration/devcontainer.json delete mode 100644 .devcontainer/standard-integration/welcome-message.sh diff --git a/.devcontainer/advanced-integration-v1/devcontainer.json b/.devcontainer/advanced-integration-v1/devcontainer.json index ffb6f41c..9ce61d30 100644 --- a/.devcontainer/advanced-integration-v1/devcontainer.json +++ b/.devcontainer/advanced-integration-v1/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "PayPal Advanced Integration (v1)", + "name": "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. diff --git a/.devcontainer/advanced-integration-v2-html-dotnet/devcontainer.json b/.devcontainer/advanced-integration-v2-html-dotnet/devcontainer.json index 65fa37f6..2ef1ead0 100644 --- a/.devcontainer/advanced-integration-v2-html-dotnet/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-html-dotnet/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "advanced-integration/html/dotnet", + "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. diff --git a/.devcontainer/advanced-integration-v2-html-java/devcontainer.json b/.devcontainer/advanced-integration-v2-html-java/devcontainer.json index a9e777b1..3dcae617 100644 --- a/.devcontainer/advanced-integration-v2-html-java/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-html-java/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "advanced-integration/html/java", + "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. diff --git a/.devcontainer/advanced-integration-v2-html-node/devcontainer.json b/.devcontainer/advanced-integration-v2-html-node/devcontainer.json index 3e254123..f5f00400 100644 --- a/.devcontainer/advanced-integration-v2-html-node/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-html-node/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "advanced-integration/html/node", + "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. diff --git a/.devcontainer/advanced-integration-v2-html-php/devcontainer.json b/.devcontainer/advanced-integration-v2-html-php/devcontainer.json index ab087a51..6afcc17b 100644 --- a/.devcontainer/advanced-integration-v2-html-php/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-html-php/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "advanced-integration/html/php", + "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. diff --git a/.devcontainer/advanced-integration-v2-react-dotnet/devcontainer.json b/.devcontainer/advanced-integration-v2-react-dotnet/devcontainer.json index 4a21167a..a4911ab0 100644 --- a/.devcontainer/advanced-integration-v2-react-dotnet/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-react-dotnet/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": " advanced-integration/react/dotnet", + "name": " advanced-integration-v2/react/dotnet", "image": "mcr.microsoft.com/devcontainers/dotnet:8.0", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/advanced-integration-v2-react-java/devcontainer.json b/.devcontainer/advanced-integration-v2-react-java/devcontainer.json index 0a272c0f..e55feb54 100644 --- a/.devcontainer/advanced-integration-v2-react-java/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-react-java/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "advanced-integration/react/java", + "name": "advanced-integration-v2/react/java", "image": "mcr.microsoft.com/devcontainers/java:21", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/advanced-integration-v2-react-node/devcontainer.json b/.devcontainer/advanced-integration-v2-react-node/devcontainer.json index c1660b28..2efab718 100644 --- a/.devcontainer/advanced-integration-v2-react-node/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-react-node/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "advanced-integration/react/node", + "name": "advanced-integration-v2/react/node", "image": "mcr.microsoft.com/devcontainers/javascript-node:20", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/advanced-integration-v2-react-php/devcontainer.json b/.devcontainer/advanced-integration-v2-react-php/devcontainer.json index b1870838..4980fd30 100644 --- a/.devcontainer/advanced-integration-v2-react-php/devcontainer.json +++ b/.devcontainer/advanced-integration-v2-react-php/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "advanced-integration/react/php", + "name": "advanced-integration-v2/react/php", "image": "mcr.microsoft.com/devcontainers/php:8", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/advanced-integration-v2/devcontainer.json b/.devcontainer/advanced-integration-v2/devcontainer.json deleted file mode 100644 index 6fd991e1..00000000 --- a/.devcontainer/advanced-integration-v2/devcontainer.json +++ /dev/null @@ -1,44 +0,0 @@ -// 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": { - "Install Server Packages": "cd server/node && npm install", - "Install Client Packages": "cd client/html && npm install" - }, - // Use 'postAttachCommand' to run commands when attaching to the container. - "postAttachCommand": { - "Start server": "cd server/node && npm start", - "Start client": "cd client/html && npm start" - }, - // Use 'forwardPorts' to make a list of ports inside the container available locally. - "forwardPorts": [3000, 8080], - "portsAttributes": { - "3000": { - "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" - } - } - } -} diff --git a/.devcontainer/advanced-integration-v2/welcome-message.sh b/.devcontainer/advanced-integration-v2/welcome-message.sh deleted file mode 100644 index ae9a72f9..00000000 --- a/.devcontainer/advanced-integration-v2/welcome-message.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/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" diff --git a/.devcontainer/save-payment-method/devcontainer.json b/.devcontainer/save-payment-method/devcontainer.json index ec88eb6c..88b05faa 100644 --- a/.devcontainer/save-payment-method/devcontainer.json +++ b/.devcontainer/save-payment-method/devcontainer.json @@ -1,6 +1,6 @@ // For more details, see https://aka.ms/devcontainer.json. { - "name": "PayPal Save Payment Method", + "name": "save-payment-metthod", "image": "mcr.microsoft.com/devcontainers/javascript-node:20", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}/save-payment-method", // Use 'onCreateCommand' to run commands when creating the container. diff --git a/.devcontainer/standard-integration/devcontainer.json b/.devcontainer/standard-integration/devcontainer.json deleted file mode 100644 index 508fb74b..00000000 --- a/.devcontainer/standard-integration/devcontainer.json +++ /dev/null @@ -1,44 +0,0 @@ -// 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": { - "Install Client Packages": "cd client/html && npm install", - "Install Server Packages": "cd server/node && npm install" - }, - // Use 'postAttachCommand' to run commands when attaching to the container. - "postAttachCommand": { - "Start client": "cd client/html && npm start", - "Start server": "cd server/node && npm start" - }, - // Use 'forwardPorts' to make a list of ports inside the container available locally. - "forwardPorts": [3000, 8080], - "portsAttributes": { - "3000": { - "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" - } - } - } -} diff --git a/.devcontainer/standard-integration/welcome-message.sh b/.devcontainer/standard-integration/welcome-message.sh deleted file mode 100644 index 78cce216..00000000 --- a/.devcontainer/standard-integration/welcome-message.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/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" From 6f2157a4cd914aac1b487fd007dcb802f26ce256 Mon Sep 17 00:00:00 2001 From: Sourav Sarkar Date: Fri, 27 Sep 2024 10:27:50 +0530 Subject: [PATCH 12/18] feat: add component show to show transaction message --- advanced-integration/v2/client/react/client/App.jsx | 12 +++++++++--- standard-integration/client/html/client/app.js | 8 +++++++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/advanced-integration/v2/client/react/client/App.jsx b/advanced-integration/v2/client/react/client/App.jsx index bed59906..fc670070 100644 --- a/advanced-integration/v2/client/react/client/App.jsx +++ b/advanced-integration/v2/client/react/client/App.jsx @@ -9,6 +9,7 @@ import { export default function App() { const [isPaying, setIsPaying] = useState(false); + const [message, setMessage] = useState(""); const initialOptions = { "client-id": import.meta.env.PAYPAL_CLIENT_ID, "enable-funding": "venmo", @@ -126,7 +127,7 @@ export default function App() { setMessage(await onApprove(data))} onError={onError} style={{ shape: "rect", @@ -138,7 +139,7 @@ export default function App() { setMessage(await onApprove(data))} > + ); } @@ -224,7 +226,7 @@ const SubmitPayment = ({ isPaying, setIsPaying, billingAddress }) => { } setIsPaying(true); - cardFieldsForm.submit({ billingAddress }).catch((err) => { + cardFieldsForm.submit({ billingAddress }).finally((err) => { setIsPaying(false); }); }; @@ -238,3 +240,7 @@ const SubmitPayment = ({ isPaying, setIsPaying, billingAddress }) => { ); }; + +const Message = ({ content }) => { + return

{content}

; +}; diff --git a/standard-integration/client/html/client/app.js b/standard-integration/client/html/client/app.js index 4c70688e..685b2c46 100644 --- a/standard-integration/client/html/client/app.js +++ b/standard-integration/client/html/client/app.js @@ -42,7 +42,7 @@ window.paypal throw new Error(errorMessage); } catch (error) { console.error(error); - // resultMessage(`Could not initiate PayPal Checkout...

${error}`); + resultMessage(`Could not initiate PayPal Checkout...

${error}`); } }, @@ -98,3 +98,9 @@ window.paypal }, }) .render("#paypal-button-container"); + +// Example function to show a result to the user. Your site's UI library can be used instead. +function resultMessage(message) { + const container = document.querySelector("#result-message"); + container.innerHTML = message; +} From c316cc14eee4833ac17ea8900ea4f2d8c3ce549b Mon Sep 17 00:00:00 2001 From: Sourav Sarkar Date: Tue, 1 Oct 2024 15:47:12 +0530 Subject: [PATCH 13/18] chore: rename client/server folders and update README --- advanced-integration/v2/client/html/README.md | 4 +- .../v2/client/html/{client => src}/app.js | 0 .../v2/client/html/{client => src}/index.html | 0 .../v2/client/html/vite.config.js | 2 +- .../v2/client/react/.env.example | 3 + .../v2/client/react/README.md | 4 +- .../v2/client/react/{client => src}/App.jsx | 0 .../client/react/{client => src}/index.html | 0 .../v2/client/react/{client => src}/main.jsx | 0 .../v2/client/react/vite.config.js | 2 +- .../v2/server/node/package.json | 4 +- .../v2/server/node/{server => }/server.js | 0 .../v2/server/php/composer.json | 2 +- .../v2/server/php/{server => src}/.htaccess | 0 .../v2/server/php/{server => src}/index.php | 0 standard-integration/client/html/README.md | 6 +- .../client/html/{client => src}/app.js | 0 .../client/html/{client => src}/index.html | 0 .../client/html/vite.config.js | 2 +- standard-integration/client/react/README.md | 6 +- .../client/react/{client => src}/App.jsx | 1 + .../client/react/{client => src}/index.html | 0 .../client/react/{client => src}/main.jsx | 0 .../client/react/vite.config.js | 2 +- standard-integration/server/node/package.json | 4 +- .../server/node/{server => }/server.js | 127 ------------------ standard-integration/server/php/composer.json | 2 +- .../server/php/{server => src}/.htaccess | 0 .../server/php/{server => src}/index.php | 4 +- 29 files changed, 25 insertions(+), 150 deletions(-) rename advanced-integration/v2/client/html/{client => src}/app.js (100%) rename advanced-integration/v2/client/html/{client => src}/index.html (100%) rename advanced-integration/v2/client/react/{client => src}/App.jsx (100%) rename advanced-integration/v2/client/react/{client => src}/index.html (100%) rename advanced-integration/v2/client/react/{client => src}/main.jsx (100%) rename advanced-integration/v2/server/node/{server => }/server.js (100%) rename advanced-integration/v2/server/php/{server => src}/.htaccess (100%) rename advanced-integration/v2/server/php/{server => src}/index.php (100%) rename standard-integration/client/html/{client => src}/app.js (100%) rename standard-integration/client/html/{client => src}/index.html (100%) rename standard-integration/client/react/{client => src}/App.jsx (99%) rename standard-integration/client/react/{client => src}/index.html (100%) rename standard-integration/client/react/{client => src}/main.jsx (100%) rename standard-integration/server/node/{server => }/server.js (50%) rename standard-integration/server/php/{server => src}/.htaccess (100%) rename standard-integration/server/php/{server => src}/index.php (97%) diff --git a/advanced-integration/v2/client/html/README.md b/advanced-integration/v2/client/html/README.md index a98bb13f..08187da8 100644 --- a/advanced-integration/v2/client/html/README.md +++ b/advanced-integration/v2/client/html/README.md @@ -57,12 +57,12 @@ npm install 3. Starting the development server - - **Start the server**: Follow the instructions in the server's README to start it. Typically, this involves running npm run dev or a similar command in the server directory. + - **Start the server**: Follow the instructions in the server's README to start it. Typically, this involves running npm run start or a similar command in the server directory. - **Start the client**: ```bash - npm run dev + npm run start ``` This will start the development server, and you should be able to access the Advanced Checkout Page in your browser at `http://localhost:3000` (or the port specfied in the terminal output). diff --git a/advanced-integration/v2/client/html/client/app.js b/advanced-integration/v2/client/html/src/app.js similarity index 100% rename from advanced-integration/v2/client/html/client/app.js rename to advanced-integration/v2/client/html/src/app.js diff --git a/advanced-integration/v2/client/html/client/index.html b/advanced-integration/v2/client/html/src/index.html similarity index 100% rename from advanced-integration/v2/client/html/client/index.html rename to advanced-integration/v2/client/html/src/index.html diff --git a/advanced-integration/v2/client/html/vite.config.js b/advanced-integration/v2/client/html/vite.config.js index 76921cbb..0a14da0e 100644 --- a/advanced-integration/v2/client/html/vite.config.js +++ b/advanced-integration/v2/client/html/vite.config.js @@ -5,7 +5,7 @@ export default defineConfig({ plugins: [], envDir: "../", envPrefix: "PAYPAL", - root: "client", + root: "src", server: { port: 3000, proxy: { diff --git a/advanced-integration/v2/client/react/.env.example b/advanced-integration/v2/client/react/.env.example index abea0386..9ce40285 100644 --- a/advanced-integration/v2/client/react/.env.example +++ b/advanced-integration/v2/client/react/.env.example @@ -1 +1,4 @@ +# Create an application to obtain credentials at +# https://developer.paypal.com/dashboard/applications/sandbox + PAYPAL_CLIENT_ID=PAYPAL_CLIENT_ID \ No newline at end of file diff --git a/advanced-integration/v2/client/react/README.md b/advanced-integration/v2/client/react/README.md index 70f5f11e..107c6b55 100644 --- a/advanced-integration/v2/client/react/README.md +++ b/advanced-integration/v2/client/react/README.md @@ -57,12 +57,12 @@ npm install 3. Starting the development server - - **Start the server**: Follow the instructions in the server's README to start it. Typically, this involves running npm run dev or a similar command in the server directory. + - **Start the server**: Follow the instructions in the server's README to start it. Typically, this involves running npm run start or a similar command in the server directory. - **Start the client**: ```bash - npm run dev + npm run start ``` This will start the development server, and you should be able to access the Advanced Checkout Page in your browser at `http://localhost:3000` (or the port specfied in the terminal output). diff --git a/advanced-integration/v2/client/react/client/App.jsx b/advanced-integration/v2/client/react/src/App.jsx similarity index 100% rename from advanced-integration/v2/client/react/client/App.jsx rename to advanced-integration/v2/client/react/src/App.jsx diff --git a/advanced-integration/v2/client/react/client/index.html b/advanced-integration/v2/client/react/src/index.html similarity index 100% rename from advanced-integration/v2/client/react/client/index.html rename to advanced-integration/v2/client/react/src/index.html diff --git a/advanced-integration/v2/client/react/client/main.jsx b/advanced-integration/v2/client/react/src/main.jsx similarity index 100% rename from advanced-integration/v2/client/react/client/main.jsx rename to advanced-integration/v2/client/react/src/main.jsx diff --git a/advanced-integration/v2/client/react/vite.config.js b/advanced-integration/v2/client/react/vite.config.js index 8049384e..274f8cf5 100644 --- a/advanced-integration/v2/client/react/vite.config.js +++ b/advanced-integration/v2/client/react/vite.config.js @@ -4,7 +4,7 @@ import react from '@vitejs/plugin-react' // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], - root: "client", + root: "src", envDir: "../", envPrefix: "PAYPAL", server: { diff --git a/advanced-integration/v2/server/node/package.json b/advanced-integration/v2/server/node/package.json index fa0a49aa..9d785be7 100644 --- a/advanced-integration/v2/server/node/package.json +++ b/advanced-integration/v2/server/node/package.json @@ -11,9 +11,9 @@ "node-fetch": "^3.3.2" }, "scripts": { - "server-dev": "nodemon server/server.js", + "server-dev": "nodemon server.js", "start": "npm run server-dev", - "prod": "node server/server.js", + "prod": "node server.js", "format": "npx prettier --write **/*.{js,jsx,md}", "format:check": "npx prettier --check **/*.{js,jsx,md}" }, diff --git a/advanced-integration/v2/server/node/server/server.js b/advanced-integration/v2/server/node/server.js similarity index 100% rename from advanced-integration/v2/server/node/server/server.js rename to advanced-integration/v2/server/node/server.js diff --git a/advanced-integration/v2/server/php/composer.json b/advanced-integration/v2/server/php/composer.json index 5dfd9351..3ddff170 100644 --- a/advanced-integration/v2/server/php/composer.json +++ b/advanced-integration/v2/server/php/composer.json @@ -18,7 +18,7 @@ "squizlabs/php_codesniffer": "^3.7" }, "scripts": { - "start": "php -S localhost:8080 -t server", + "start": "php -S localhost:8080 -t src", "test": "phpunit" }, "config": { diff --git a/advanced-integration/v2/server/php/server/.htaccess b/advanced-integration/v2/server/php/src/.htaccess similarity index 100% rename from advanced-integration/v2/server/php/server/.htaccess rename to advanced-integration/v2/server/php/src/.htaccess diff --git a/advanced-integration/v2/server/php/server/index.php b/advanced-integration/v2/server/php/src/index.php similarity index 100% rename from advanced-integration/v2/server/php/server/index.php rename to advanced-integration/v2/server/php/src/index.php diff --git a/standard-integration/client/html/README.md b/standard-integration/client/html/README.md index 302fcb42..fba52a4b 100644 --- a/standard-integration/client/html/README.md +++ b/standard-integration/client/html/README.md @@ -57,15 +57,15 @@ npm install 3. Starting the development server - - **Start the server**: Follow the instructions in the server's README to start it. Typically, this involves running npm run dev or a similar command in the server directory. + - **Start the server**: Follow the instructions in the server's README to start it. Typically, this involves running npm run start or a similar command in the server directory. - **Start the client**: ```bash - npm run dev + npm run start ``` - This will start the development server, and you should be able to access the Advanced Checkout Page in your browser at `http://localhost:3000` (or the port specfied in the terminal output). + This will start the development server, and you should be able to access the Standard Checkout Page in your browser at `http://localhost:3000` (or the port specfied in the terminal output). ### Additional Notes diff --git a/standard-integration/client/html/client/app.js b/standard-integration/client/html/src/app.js similarity index 100% rename from standard-integration/client/html/client/app.js rename to standard-integration/client/html/src/app.js diff --git a/standard-integration/client/html/client/index.html b/standard-integration/client/html/src/index.html similarity index 100% rename from standard-integration/client/html/client/index.html rename to standard-integration/client/html/src/index.html diff --git a/standard-integration/client/html/vite.config.js b/standard-integration/client/html/vite.config.js index 76921cbb..0a14da0e 100644 --- a/standard-integration/client/html/vite.config.js +++ b/standard-integration/client/html/vite.config.js @@ -5,7 +5,7 @@ export default defineConfig({ plugins: [], envDir: "../", envPrefix: "PAYPAL", - root: "client", + root: "src", server: { port: 3000, proxy: { diff --git a/standard-integration/client/react/README.md b/standard-integration/client/react/README.md index da8ec278..208ccd52 100644 --- a/standard-integration/client/react/README.md +++ b/standard-integration/client/react/README.md @@ -57,15 +57,15 @@ npm install 3. Starting the development server - - **Start the server**: Follow the instructions in the server's README to start it. Typically, this involves running npm run dev or a similar command in the server directory. + - **Start the server**: Follow the instructions in the server's README to start it. Typically, this involves running npm run start or a similar command in the server directory. - **Start the client**: ```bash - npm run dev + npm run start ``` - This will start the development server, and you should be able to access the Advanced Checkout Page in your browser at `http://localhost:3000` (or the port specfied in the terminal output). + This will start the development server, and you should be able to access the Standard Checkout Page in your browser at `http://localhost:3000` (or the port specfied in the terminal output). ### Additional Notes diff --git a/standard-integration/client/react/client/App.jsx b/standard-integration/client/react/src/App.jsx similarity index 99% rename from standard-integration/client/react/client/App.jsx rename to standard-integration/client/react/src/App.jsx index ec740440..49deee9d 100644 --- a/standard-integration/client/react/client/App.jsx +++ b/standard-integration/client/react/src/App.jsx @@ -13,6 +13,7 @@ function App() { "buyer-country": "US", currency: "USD", components: "buttons", + intent: 'authorize' }; const [message, setMessage] = useState(""); diff --git a/standard-integration/client/react/client/index.html b/standard-integration/client/react/src/index.html similarity index 100% rename from standard-integration/client/react/client/index.html rename to standard-integration/client/react/src/index.html diff --git a/standard-integration/client/react/client/main.jsx b/standard-integration/client/react/src/main.jsx similarity index 100% rename from standard-integration/client/react/client/main.jsx rename to standard-integration/client/react/src/main.jsx diff --git a/standard-integration/client/react/vite.config.js b/standard-integration/client/react/vite.config.js index 8049384e..274f8cf5 100644 --- a/standard-integration/client/react/vite.config.js +++ b/standard-integration/client/react/vite.config.js @@ -4,7 +4,7 @@ import react from '@vitejs/plugin-react' // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], - root: "client", + root: "src", envDir: "../", envPrefix: "PAYPAL", server: { diff --git a/standard-integration/server/node/package.json b/standard-integration/server/node/package.json index 224be3a2..37f4b798 100644 --- a/standard-integration/server/node/package.json +++ b/standard-integration/server/node/package.json @@ -11,9 +11,9 @@ "node-fetch": "^3.3.2" }, "scripts": { - "server-dev": "nodemon server/server.js", + "server-dev": "nodemon server.js", "start": "npm run server-dev", - "prod": "node server/server.js", + "prod": "node server.js", "format": "npx prettier --write **/*.{js,jsx,md}", "format:check": "npx prettier --check **/*.{js,jsx,md}" }, diff --git a/standard-integration/server/node/server/server.js b/standard-integration/server/node/server.js similarity index 50% rename from standard-integration/server/node/server/server.js rename to standard-integration/server/node/server.js index 94f37c28..08aadad1 100644 --- a/standard-integration/server/node/server/server.js +++ b/standard-integration/server/node/server.js @@ -125,130 +125,3 @@ app.post("/api/orders/:orderID/capture", async (req, res) => { app.listen(PORT, () => { console.log(`Node server listening at http://localhost:${PORT}/`); }); -import express from "express"; -import "dotenv/config"; -import { - ApiError, - CheckoutPaymentIntent, - Client, - Environment, - LogLevel, - OrdersController, -} from "@paypal/paypal-server-sdk"; -import bodyParser from "body-parser"; - -const app = express(); -app.use(bodyParser.json()); - -const { PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PORT = 8080 } = process.env; - -const client = new Client({ - clientCredentialsAuthCredentials: { - oAuthClientId: PAYPAL_CLIENT_ID, - oAuthClientSecret: PAYPAL_CLIENT_SECRET, - }, - timeout: 0, - environment: Environment.Sandbox, - logging: { - logLevel: LogLevel.Info, - logRequest: { - logBody: true, - }, - logResponse: { - logHeaders: true, - }, - }, -}); - -const ordersController = new OrdersController(client); - -/** - * Create an order to start the transaction. - * @see https://developer.paypal.com/docs/api/orders/v2/#orders_create - */ -const createOrder = async (cart) => { - const collect = { - body: { - intent: CheckoutPaymentIntent.CAPTURE, - purchaseUnits: [ - { - amount: { - currencyCode: "USD", - value: "100.00", - }, - }, - ], - }, - prefer: "return=minimal", - }; - - try { - const { body, ...httpResponse } = - await ordersController.ordersCreate(collect); - // Get more response info... - // const { statusCode, headers } = httpResponse; - return { - jsonResponse: JSON.parse(body), - httpStatusCode: httpResponse.statusCode, - }; - } catch (error) { - if (error instanceof ApiError) { - // const { statusCode, headers } = error; - throw new Error(error.message); - } - } -}; - -/** - * Capture payment for the created order to complete the transaction. - * @see https://developer.paypal.com/docs/api/orders/v2/#orders_capture - */ -const captureOrder = async (orderID) => { - const collect = { - id: orderID, - prefer: "return=minimal", - }; - - try { - const { body, ...httpResponse } = - await ordersController.ordersCapture(collect); - // Get more response info... - // const { statusCode, headers } = httpResponse; - return { - jsonResponse: JSON.parse(body), - httpStatusCode: httpResponse.statusCode, - }; - } catch (error) { - if (error instanceof ApiError) { - // const { statusCode, headers } = error; - throw new Error(error.message); - } - } -}; - -app.post("/api/orders", async (req, res) => { - try { - // use the cart information passed from the front-end to calculate the order amount detals - const { cart } = req.body; - const { jsonResponse, httpStatusCode } = await createOrder(cart); - res.status(httpStatusCode).json(jsonResponse); - } catch (error) { - console.error("Failed to create order:", error); - res.status(500).json({ error: "Failed to create order." }); - } -}); - -app.post("/api/orders/:orderID/capture", async (req, res) => { - try { - const { orderID } = req.params; - const { jsonResponse, httpStatusCode } = await captureOrder(orderID); - res.status(httpStatusCode).json(jsonResponse); - } catch (error) { - console.error("Failed to create order:", error); - res.status(500).json({ error: "Failed to capture order." }); - } -}); - -app.listen(PORT, () => { - console.log(`Node server listening at http://localhost:${PORT}/`); -}); diff --git a/standard-integration/server/php/composer.json b/standard-integration/server/php/composer.json index 010fd632..da7111dc 100644 --- a/standard-integration/server/php/composer.json +++ b/standard-integration/server/php/composer.json @@ -18,7 +18,7 @@ "squizlabs/php_codesniffer": "^3.7" }, "scripts": { - "start": "php -S localhost:8080 -t server", + "start": "php -S localhost:8080 -t src", "test": "phpunit" }, "config": { diff --git a/standard-integration/server/php/server/.htaccess b/standard-integration/server/php/src/.htaccess similarity index 100% rename from standard-integration/server/php/server/.htaccess rename to standard-integration/server/php/src/.htaccess diff --git a/standard-integration/server/php/server/index.php b/standard-integration/server/php/src/index.php similarity index 97% rename from standard-integration/server/php/server/index.php rename to standard-integration/server/php/src/index.php index b442514f..51dc2fc4 100644 --- a/standard-integration/server/php/server/index.php +++ b/standard-integration/server/php/src/index.php @@ -9,8 +9,6 @@ use PaypalServerSDKLib\Models\Builders\PurchaseUnitRequestBuilder; use PaypalServerSDKLib\Models\Builders\AmountWithBreakdownBuilder; -$env = parse_ini_file('.env'); - $PAYPAL_CLIENT_ID = getenv('PAYPAL_CLIENT_ID'); $PAYPAL_CLIENT_SECRET = getenv('PAYPAL_CLIENT_SECRET'); @@ -34,7 +32,7 @@ function createOrder($cart) $orderBody = [ 'body' => OrderRequestBuilder::init( - CheckoutPaymentIntent::CAPTURE, + 'AUTHORIZE', [ PurchaseUnitRequestBuilder::init( AmountWithBreakdownBuilder::init( From 25efdb3bb207a693133abfed174a672e956b4d70 Mon Sep 17 00:00:00 2001 From: Sourav Sarkar Date: Tue, 1 Oct 2024 15:52:32 +0530 Subject: [PATCH 14/18] docs: update steps for setting env variable --- advanced-integration/v2/server/dotnet/README.md | 4 ++-- advanced-integration/v2/server/java/README.md | 4 ++-- advanced-integration/v2/server/node/README.md | 4 ++-- advanced-integration/v2/server/php/README.md | 4 ++-- standard-integration/server/dotnet/README.md | 4 ++-- standard-integration/server/java/README.md | 4 ++-- standard-integration/server/node/README.md | 4 ++-- standard-integration/server/php/README.md | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/advanced-integration/v2/server/dotnet/README.md b/advanced-integration/v2/server/dotnet/README.md index 52ed7c55..b6b09826 100644 --- a/advanced-integration/v2/server/dotnet/README.md +++ b/advanced-integration/v2/server/dotnet/README.md @@ -6,14 +6,14 @@ PayPal Advanced Integration sample in .NET 1. **Add your API credentials to the environment:** - - **Windows** + - **Windows (powershell)** ```powershell $env:PAYPAL_CLIENT_ID = "" $env:PAYPAL_CLIENT_SECRET = "" ``` - - **Unix** + - **Linux / MacOS** ```bash export PAYPAL_CLIENT_ID="" diff --git a/advanced-integration/v2/server/java/README.md b/advanced-integration/v2/server/java/README.md index 8e330262..93d911cb 100644 --- a/advanced-integration/v2/server/java/README.md +++ b/advanced-integration/v2/server/java/README.md @@ -6,14 +6,14 @@ PayPal Advanced Integration sample in Java 1. Add your API credentials to the environment: - - **Windows** + - **Windows (powershell)** ```powershell $env:PAYPAL_CLIENT_ID = "" $env:PAYPAL_CLIENT_SECRET = "" ``` - - **Unix** + - **Linux / MacOS** ```bash export PAYPAL_CLIENT_ID="" diff --git a/advanced-integration/v2/server/node/README.md b/advanced-integration/v2/server/node/README.md index 2a224db8..2dba034b 100644 --- a/advanced-integration/v2/server/node/README.md +++ b/advanced-integration/v2/server/node/README.md @@ -6,14 +6,14 @@ PayPal Advanced Integration sample in Node.js 1. Add your API credentials to the environment: - - **Windows** + - **Windows (powershell)** ```powershell $env:PAYPAL_CLIENT_ID = "" $env:PAYPAL_CLIENT_SECRET = "" ``` - - **Unix** + - **Linux / MacOS** ```bash export PAYPAL_CLIENT_ID="" diff --git a/advanced-integration/v2/server/php/README.md b/advanced-integration/v2/server/php/README.md index a789b6bf..2bcecf8d 100644 --- a/advanced-integration/v2/server/php/README.md +++ b/advanced-integration/v2/server/php/README.md @@ -20,14 +20,14 @@ This sample app demonstrates how to integrate with ACDC using PayPal's REST APIs 1. Add your API credentials to the environment: - - **Windows** + - **Windows (powershell)** ```powershell $env:PAYPAL_CLIENT_ID = "" $env:PAYPAL_CLIENT_SECRET = "" ``` - - **Unix** + - **Linux / MacOS** ```bash export PAYPAL_CLIENT_ID="" diff --git a/standard-integration/server/dotnet/README.md b/standard-integration/server/dotnet/README.md index d1f5fd91..24040c3c 100644 --- a/standard-integration/server/dotnet/README.md +++ b/standard-integration/server/dotnet/README.md @@ -6,14 +6,14 @@ PayPal Standard Integration sample in .NET 1. **Add your API credentials to the environment:** - - **Windows** + - **Windows (powershell)** ```powershell $env:PAYPAL_CLIENT_ID = "" $env:PAYPAL_CLIENT_SECRET = "" ``` - - **Unix** + - **Linux / MacOS** ```bash export PAYPAL_CLIENT_ID="" diff --git a/standard-integration/server/java/README.md b/standard-integration/server/java/README.md index a9fcce21..52ace294 100644 --- a/standard-integration/server/java/README.md +++ b/standard-integration/server/java/README.md @@ -6,14 +6,14 @@ PayPal Standard Integration sample in Java 1. Add your API credentials to the environment: - - **Windows** + - **Windows (powershell)** ```powershell $env:PAYPAL_CLIENT_ID = "" $env:PAYPAL_CLIENT_SECRET = "" ``` - - **Unix** + - **Linux / MacOS** ```bash export PAYPAL_CLIENT_ID="" diff --git a/standard-integration/server/node/README.md b/standard-integration/server/node/README.md index 0fce05d5..ef76e297 100644 --- a/standard-integration/server/node/README.md +++ b/standard-integration/server/node/README.md @@ -6,14 +6,14 @@ PayPal Standard Integration sample in Node.js 1. Add your API credentials to the environment: - - **Windows** + - **Windows (powershell)** ```powershell $env:PAYPAL_CLIENT_ID = "" $env:PAYPAL_CLIENT_SECRET = "" ``` - - **Unix** + - **Linux / MacOS** ```bash export PAYPAL_CLIENT_ID="" diff --git a/standard-integration/server/php/README.md b/standard-integration/server/php/README.md index 53284b42..dd42041d 100644 --- a/standard-integration/server/php/README.md +++ b/standard-integration/server/php/README.md @@ -20,14 +20,14 @@ This sample app demonstrates how to integrate with ACDC using PayPal's REST APIs 1. Add your API credentials to the environment: - - **Windows** + - **Windows (powershell)** ```powershell $env:PAYPAL_CLIENT_ID = "" $env:PAYPAL_CLIENT_SECRET = "" ``` - - **Unix** + - **Linux / MacOS** ```bash export PAYPAL_CLIENT_ID="" From a1d54840c340c2084d15cb962b0e2d6c57046695 Mon Sep 17 00:00:00 2001 From: sourav sarkar Date: Wed, 2 Oct 2024 04:58:45 +0000 Subject: [PATCH 15/18] chore: remove authorize intent --- standard-integration/client/react/src/App.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/standard-integration/client/react/src/App.jsx b/standard-integration/client/react/src/App.jsx index 49deee9d..ec740440 100644 --- a/standard-integration/client/react/src/App.jsx +++ b/standard-integration/client/react/src/App.jsx @@ -13,7 +13,6 @@ function App() { "buyer-country": "US", currency: "USD", components: "buttons", - intent: 'authorize' }; const [message, setMessage] = useState(""); From 07c697450793db36750cdf3ccea78c4e30f1f407 Mon Sep 17 00:00:00 2001 From: Sourav Sarkar Date: Tue, 8 Oct 2024 00:36:43 +0530 Subject: [PATCH 16/18] chore: remove node-fetch dependency --- advanced-integration/v2/server/node/package.json | 3 +-- standard-integration/server/node/package.json | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/advanced-integration/v2/server/node/package.json b/advanced-integration/v2/server/node/package.json index 9d785be7..44735762 100644 --- a/advanced-integration/v2/server/node/package.json +++ b/advanced-integration/v2/server/node/package.json @@ -7,8 +7,7 @@ "@paypal/paypal-server-sdk": "^0.5.1", "body-parser": "^1.20.3", "dotenv": "^16.3.1", - "express": "^4.18.2", - "node-fetch": "^3.3.2" + "express": "^4.18.2" }, "scripts": { "server-dev": "nodemon server.js", diff --git a/standard-integration/server/node/package.json b/standard-integration/server/node/package.json index 37f4b798..29301738 100644 --- a/standard-integration/server/node/package.json +++ b/standard-integration/server/node/package.json @@ -7,8 +7,7 @@ "@paypal/paypal-server-sdk": "^0.5.1", "body-parser": "^1.20.3", "dotenv": "^16.3.1", - "express": "^4.18.2", - "node-fetch": "^3.3.2" + "express": "^4.18.2" }, "scripts": { "server-dev": "nodemon server.js", From 02622b7046183efe81e49b250c04befb54d85f58 Mon Sep 17 00:00:00 2001 From: Sourav Sarkar Date: Tue, 8 Oct 2024 13:33:06 +0530 Subject: [PATCH 17/18] chore: remove unsed php packages --- .../v2/server/php/composer.json | 15 +- .../v2/server/php/composer.lock | 3528 +--------------- standard-integration/server/php/composer.json | 15 +- standard-integration/server/php/composer.lock | 3533 +---------------- standard-integration/server/php/src/index.php | 2 +- 5 files changed, 121 insertions(+), 6972 deletions(-) diff --git a/advanced-integration/v2/server/php/composer.json b/advanced-integration/v2/server/php/composer.json index 3ddff170..721ec31f 100644 --- a/advanced-integration/v2/server/php/composer.json +++ b/advanced-integration/v2/server/php/composer.json @@ -4,26 +4,13 @@ "require": { "php": "^7.4 || ^8.0", "ext-json": "*", - "guzzlehttp/guzzle": "^7.9", - "monolog/monolog": "^2.8", - "php-di/php-di": "^6.4", "paypal/paypal-server-sdk": "0.5.1" }, "require-dev": { - "jangregor/phpstan-prophecy": "^1.0.0", - "phpspec/prophecy-phpunit": "^2.0", - "phpstan/extension-installer": "^1.2.0", - "phpstan/phpstan": "^1.8", - "phpunit/phpunit": "^9.5.26", - "squizlabs/php_codesniffer": "^3.7" }, "scripts": { - "start": "php -S localhost:8080 -t src", - "test": "phpunit" + "start": "php -S localhost:8080 -t src" }, "config": { - "allow-plugins": { - "phpstan/extension-installer": true - } } } diff --git a/advanced-integration/v2/server/php/composer.lock b/advanced-integration/v2/server/php/composer.lock index 8e09a754..39a01f7b 100644 --- a/advanced-integration/v2/server/php/composer.lock +++ b/advanced-integration/v2/server/php/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5efc5bdfe116b87d9c0f2661ff4481b2", + "content-hash": "d4a57a266f3f33beef57b02efc8cfaac", "packages": [ { "name": "apimatic/core", @@ -223,362 +223,78 @@ "time": "2023-04-25T14:19:45+00:00" }, { - "name": "guzzlehttp/guzzle", - "version": "7.9.2", + "name": "paypal/paypal-server-sdk", + "version": "0.5.1", "source": { "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b" + "url": "https://github.com/paypal/PayPal-PHP-Server-SDK.git", + "reference": "09148245f72f9dc2f6c8363b6206eac5effefa77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b", + "url": "https://api.github.com/repos/paypal/PayPal-PHP-Server-SDK/zipball/09148245f72f9dc2f6c8363b6206eac5effefa77", + "reference": "09148245f72f9dc2f6c8363b6206eac5effefa77", "shasum": "" }, "require": { + "apimatic/core": "~0.3.11", + "apimatic/core-interfaces": "~0.1.5", + "apimatic/unirest-php": "^4.0.0", "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0.3", - "guzzlehttp/psr7": "^2.7.0", - "php": "^7.2.5 || ^8.0", - "psr/http-client": "^1.0", - "symfony/deprecation-contracts": "^2.2 || ^3.0" - }, - "provide": { - "psr/http-client-implementation": "1.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "ext-curl": "*", - "guzzle/client-integration-tests": "3.0.2", - "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.39 || ^9.6.20", - "psr/log": "^1.1 || ^2.0 || ^3.0" - }, - "suggest": { - "ext-curl": "Required for CURL handler support", - "ext-intl": "Required for Internationalized Domain Name (IDN) support", - "psr/log": "Required for using the Log middleware" - }, - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } - }, - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Jeremy Lindblom", - "email": "jeremeamia@gmail.com", - "homepage": "https://github.com/jeremeamia" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "psr-18", - "psr-7", - "rest", - "web service" - ], - "support": { - "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.9.2" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", - "type": "tidelift" - } - ], - "time": "2024-07-24T11:22:20+00:00" - }, - { - "name": "guzzlehttp/promises", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", - "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", - "shasum": "" - }, - "require": { - "php": "^7.2.5 || ^8.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.39 || ^9.6.20" - }, - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - } - ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ], - "support": { - "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", - "type": "tidelift" - } - ], - "time": "2024-07-18T10:29:17+00:00" - }, - { - "name": "guzzlehttp/psr7", - "version": "2.7.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", - "shasum": "" - }, - "require": { - "php": "^7.2.5 || ^8.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.1 || ^2.0", - "ralouphie/getallheaders": "^3.0" - }, - "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" + "php": "^7.2 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "http-interop/http-factory-tests": "0.9.0", - "phpunit/phpunit": "^8.5.39 || ^9.6.20" - }, - "suggest": { - "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + "phan/phan": "5.4.2", + "squizlabs/php_codesniffer": "^3.5" }, "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } - }, "autoload": { "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" + "PaypalServerSDKLib\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" - ], + "description": "PayPal's SDK for interacting with the REST APIs", + "homepage": "https://github.com/paypal/PayPal-PHP-Server-SDK", "support": { - "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.7.0" + "issues": "https://github.com/paypal/PayPal-PHP-Server-SDK/issues", + "source": "https://github.com/paypal/PayPal-PHP-Server-SDK/tree/0.5.1" }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", - "type": "tidelift" - } - ], - "time": "2024-07-18T11:15:46+00:00" + "time": "2024-09-10T15:31:38+00:00" }, { - "name": "laravel/serializable-closure", - "version": "v1.3.3", + "name": "php-jsonpointer/php-jsonpointer", + "version": "v3.0.2", "source": { "type": "git", - "url": "https://github.com/laravel/serializable-closure.git", - "reference": "3dbf8a8e914634c48d389c1234552666b3d43754" + "url": "https://github.com/raphaelstolt/php-jsonpointer.git", + "reference": "4428f86c6f23846e9faa5a420c4ef14e485b3afb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/3dbf8a8e914634c48d389c1234552666b3d43754", - "reference": "3dbf8a8e914634c48d389c1234552666b3d43754", + "url": "https://api.github.com/repos/raphaelstolt/php-jsonpointer/zipball/4428f86c6f23846e9faa5a420c4ef14e485b3afb", + "reference": "4428f86c6f23846e9faa5a420c4ef14e485b3afb", "shasum": "" }, "require": { - "php": "^7.3|^8.0" + "php": ">=5.4" }, "require-dev": { - "nesbot/carbon": "^2.61", - "pestphp/pest": "^1.21.3", - "phpstan/phpstan": "^1.8.2", - "symfony/var-dumper": "^5.4.11" + "friendsofphp/php-cs-fixer": "^1.11", + "phpunit/phpunit": "4.6.*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { - "psr-4": { - "Laravel\\SerializableClosure\\": "src/" + "psr-0": { + "Rs\\Json": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -587,92 +303,50 @@ ], "authors": [ { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - }, - { - "name": "Nuno Maduro", - "email": "nuno@laravel.com" + "name": "Raphael Stolt", + "email": "raphael.stolt@gmail.com", + "homepage": "http://raphaelstolt.blogspot.com/" } ], - "description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.", + "description": "Implementation of JSON Pointer (http://tools.ietf.org/html/rfc6901)", + "homepage": "https://github.com/raphaelstolt/php-jsonpointer", "keywords": [ - "closure", - "laravel", - "serializable" + "json", + "json pointer", + "json traversal" ], "support": { - "issues": "https://github.com/laravel/serializable-closure/issues", - "source": "https://github.com/laravel/serializable-closure" + "issues": "https://github.com/raphaelstolt/php-jsonpointer/issues", + "source": "https://github.com/raphaelstolt/php-jsonpointer/tree/master" }, - "time": "2023-11-08T14:08:06+00:00" + "time": "2016-08-29T08:51:01+00:00" }, { - "name": "monolog/monolog", - "version": "2.9.3", + "name": "psr/log", + "version": "3.0.2", "source": { "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "a30bfe2e142720dfa990d0a7e573997f5d884215" + "url": "https://github.com/php-fig/log.git", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/a30bfe2e142720dfa990d0a7e573997f5d884215", - "reference": "a30bfe2e142720dfa990d0a7e573997f5d884215", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", "shasum": "" }, "require": { - "php": ">=7.2", - "psr/log": "^1.0.1 || ^2.0 || ^3.0" - }, - "provide": { - "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^2.4.9 || ^3.0", - "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7 || ^8", - "ext-json": "*", - "graylog2/gelf-php": "^1.4.2 || ^2@dev", - "guzzlehttp/guzzle": "^7.4", - "guzzlehttp/psr7": "^2.2", - "mongodb/mongodb": "^1.8", - "php-amqplib/php-amqplib": "~2.4 || ^3", - "phpspec/prophecy": "^1.15", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^8.5.38 || ^9.6.19", - "predis/predis": "^1.1 || ^2.0", - "rollbar/rollbar": "^1.3 || ^2 || ^3", - "ruflin/elastica": "^7", - "swiftmailer/swiftmailer": "^5.3|^6.0", - "symfony/mailer": "^5.4 || ^6", - "symfony/mime": "^5.4 || ^6" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", - "ext-mbstring": "Allow to work properly with unicode symbols", - "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", - "ext-openssl": "Required to send log messages using SSL", - "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Monolog\\": "src/Monolog" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -681,3108 +355,24 @@ ], "authors": [ { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "https://github.com/Seldaek/monolog", + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", "keywords": [ "log", - "logging", + "psr", "psr-3" ], "support": { - "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.9.3" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", - "type": "tidelift" - } - ], - "time": "2024-04-12T20:52:51+00:00" - }, - { - "name": "paypal/paypal-server-sdk", - "version": "0.5.1", - "source": { - "type": "git", - "url": "https://github.com/paypal/PayPal-PHP-Server-SDK.git", - "reference": "4f7eb529547de070defb3803257dc807be49342c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paypal/PayPal-PHP-Server-SDK/zipball/4f7eb529547de070defb3803257dc807be49342c", - "reference": "4f7eb529547de070defb3803257dc807be49342c", - "shasum": "" - }, - "require": { - "apimatic/core": "~0.3.11", - "apimatic/core-interfaces": "~0.1.5", - "apimatic/unirest-php": "^4.0.0", - "ext-json": "*", - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "phan/phan": "5.4.2", - "squizlabs/php_codesniffer": "^3.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "PaypalServerSDKLib\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PayPal's SDK for interacting with the REST APIs", - "homepage": "https://github.com/paypal/PayPal-PHP-Server-SDK", - "support": { - "issues": "https://github.com/paypal/PayPal-PHP-Server-SDK/issues", - "source": "https://github.com/paypal/PayPal-PHP-Server-SDK/tree/0.5.1" - }, - "time": "2024-09-10T14:38:12+00:00" - }, - { - "name": "php-di/invoker", - "version": "2.3.4", - "source": { - "type": "git", - "url": "https://github.com/PHP-DI/Invoker.git", - "reference": "33234b32dafa8eb69202f950a1fc92055ed76a86" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHP-DI/Invoker/zipball/33234b32dafa8eb69202f950a1fc92055ed76a86", - "reference": "33234b32dafa8eb69202f950a1fc92055ed76a86", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "psr/container": "^1.0|^2.0" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "mnapoli/hard-mode": "~0.3.0", - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Invoker\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Generic and extensible callable invoker", - "homepage": "https://github.com/PHP-DI/Invoker", - "keywords": [ - "callable", - "dependency", - "dependency-injection", - "injection", - "invoke", - "invoker" - ], - "support": { - "issues": "https://github.com/PHP-DI/Invoker/issues", - "source": "https://github.com/PHP-DI/Invoker/tree/2.3.4" - }, - "funding": [ - { - "url": "https://github.com/mnapoli", - "type": "github" - } - ], - "time": "2023-09-08T09:24:21+00:00" - }, - { - "name": "php-di/php-di", - "version": "6.4.0", - "source": { - "type": "git", - "url": "https://github.com/PHP-DI/PHP-DI.git", - "reference": "ae0f1b3b03d8b29dff81747063cbfd6276246cc4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHP-DI/PHP-DI/zipball/ae0f1b3b03d8b29dff81747063cbfd6276246cc4", - "reference": "ae0f1b3b03d8b29dff81747063cbfd6276246cc4", - "shasum": "" - }, - "require": { - "laravel/serializable-closure": "^1.0", - "php": ">=7.4.0", - "php-di/invoker": "^2.0", - "php-di/phpdoc-reader": "^2.0.1", - "psr/container": "^1.0" - }, - "provide": { - "psr/container-implementation": "^1.0" - }, - "require-dev": { - "doctrine/annotations": "~1.10", - "friendsofphp/php-cs-fixer": "^2.4", - "mnapoli/phpunit-easymock": "^1.2", - "ocramius/proxy-manager": "^2.11.2", - "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^9.5" - }, - "suggest": { - "doctrine/annotations": "Install it if you want to use annotations (version ~1.2)", - "ocramius/proxy-manager": "Install it if you want to use lazy injection (version ~2.0)" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions.php" - ], - "psr-4": { - "DI\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "The dependency injection container for humans", - "homepage": "https://php-di.org/", - "keywords": [ - "PSR-11", - "container", - "container-interop", - "dependency injection", - "di", - "ioc", - "psr11" - ], - "support": { - "issues": "https://github.com/PHP-DI/PHP-DI/issues", - "source": "https://github.com/PHP-DI/PHP-DI/tree/6.4.0" - }, - "funding": [ - { - "url": "https://github.com/mnapoli", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/php-di/php-di", - "type": "tidelift" - } - ], - "time": "2022-04-09T16:46:38+00:00" - }, - { - "name": "php-di/phpdoc-reader", - "version": "2.2.1", - "source": { - "type": "git", - "url": "https://github.com/PHP-DI/PhpDocReader.git", - "reference": "66daff34cbd2627740ffec9469ffbac9f8c8185c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHP-DI/PhpDocReader/zipball/66daff34cbd2627740ffec9469ffbac9f8c8185c", - "reference": "66daff34cbd2627740ffec9469ffbac9f8c8185c", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "require-dev": { - "mnapoli/hard-mode": "~0.3.0", - "phpunit/phpunit": "^8.5|^9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "PhpDocReader\\": "src/PhpDocReader" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PhpDocReader parses @var and @param values in PHP docblocks (supports namespaced class names with the same resolution rules as PHP)", - "keywords": [ - "phpdoc", - "reflection" - ], - "support": { - "issues": "https://github.com/PHP-DI/PhpDocReader/issues", - "source": "https://github.com/PHP-DI/PhpDocReader/tree/2.2.1" - }, - "time": "2020-10-12T12:39:22+00:00" - }, - { - "name": "php-jsonpointer/php-jsonpointer", - "version": "v3.0.2", - "source": { - "type": "git", - "url": "https://github.com/raphaelstolt/php-jsonpointer.git", - "reference": "4428f86c6f23846e9faa5a420c4ef14e485b3afb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/raphaelstolt/php-jsonpointer/zipball/4428f86c6f23846e9faa5a420c4ef14e485b3afb", - "reference": "4428f86c6f23846e9faa5a420c4ef14e485b3afb", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^1.11", - "phpunit/phpunit": "4.6.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Rs\\Json": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Raphael Stolt", - "email": "raphael.stolt@gmail.com", - "homepage": "http://raphaelstolt.blogspot.com/" - } - ], - "description": "Implementation of JSON Pointer (http://tools.ietf.org/html/rfc6901)", - "homepage": "https://github.com/raphaelstolt/php-jsonpointer", - "keywords": [ - "json", - "json pointer", - "json traversal" - ], - "support": { - "issues": "https://github.com/raphaelstolt/php-jsonpointer/issues", - "source": "https://github.com/raphaelstolt/php-jsonpointer/tree/master" - }, - "time": "2016-08-29T08:51:01+00:00" - }, - { - "name": "psr/container", - "version": "1.1.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" - }, - "time": "2021-11-05T16:50:12+00:00" - }, - { - "name": "psr/http-client", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-client.git", - "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", - "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", - "shasum": "" - }, - "require": { - "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0 || ^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP clients", - "homepage": "https://github.com/php-fig/http-client", - "keywords": [ - "http", - "http-client", - "psr", - "psr-18" - ], - "support": { - "source": "https://github.com/php-fig/http-client" - }, - "time": "2023-09-23T14:17:50+00:00" - }, - { - "name": "psr/http-factory", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", - "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", - "shasum": "" - }, - "require": { - "php": ">=7.1", - "psr/http-message": "^1.0 || ^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-factory" - }, - "time": "2024-04-15T12:06:14+00:00" - }, - { - "name": "psr/http-message", - "version": "2.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-message/tree/2.0" - }, - "time": "2023-04-04T09:54:51+00:00" - }, - { - "name": "psr/log", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/3.0.0" - }, - "time": "2021-07-14T16:46:02+00:00" - }, - { - "name": "ralouphie/getallheaders", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "120b605dfeb996808c31b6477290a714d356e822" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", - "reference": "120b605dfeb996808c31b6477290a714d356e822", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^5 || ^6.5" - }, - "type": "library", - "autoload": { - "files": [ - "src/getallheaders.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" - } - ], - "description": "A polyfill for getallheaders.", - "support": { - "issues": "https://github.com/ralouphie/getallheaders/issues", - "source": "https://github.com/ralouphie/getallheaders/tree/develop" - }, - "time": "2019-03-08T08:55:37+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v3.5.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-04-18T09:32:20+00:00" - } - ], - "packages-dev": [ - { - "name": "doctrine/deprecations", - "version": "1.1.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/deprecations.git", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "phpstan/phpstan": "1.4.10 || 1.10.15", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "0.18.4", - "psr/log": "^1 || ^2 || ^3", - "vimeo/psalm": "4.30.0 || 5.12.0" - }, - "suggest": { - "psr/log": "Allows logging deprecations via PSR-3 logger implementation" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", - "homepage": "https://www.doctrine-project.org/", - "support": { - "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.3" - }, - "time": "2024-01-30T19:34:25+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "doctrine/coding-standard": "^11", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.5.27", - "vimeo/psalm": "^5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/2.0.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-12-30T00:23:10+00:00" - }, - { - "name": "jangregor/phpstan-prophecy", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/Jan0707/phpstan-prophecy.git", - "reference": "5ee56c7db1d58f0578c82a35e3c1befe840e85a9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Jan0707/phpstan-prophecy/zipball/5ee56c7db1d58f0578c82a35e3c1befe840e85a9", - "reference": "5ee56c7db1d58f0578c82a35e3c1befe840e85a9", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0", - "phpstan/phpstan": "^1.0.0" - }, - "conflict": { - "phpspec/prophecy": "<1.7.0 || >=2.0.0", - "phpunit/phpunit": "<6.0.0 || >=12.0.0" - }, - "require-dev": { - "ergebnis/composer-normalize": "^2.1.1", - "ergebnis/license": "^1.0.0", - "ergebnis/php-cs-fixer-config": "~2.2.0", - "phpspec/prophecy": "^1.7.0", - "phpunit/phpunit": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0" - }, - "type": "phpstan-extension", - "extra": { - "phpstan": { - "includes": [ - "extension.neon" - ] - } - }, - "autoload": { - "psr-4": { - "JanGregor\\Prophecy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jan Gregor Emge-Triebel", - "email": "jan@jangregor.me" - } - ], - "description": "Provides a phpstan/phpstan extension for phpspec/prophecy", - "support": { - "issues": "https://github.com/Jan0707/phpstan-prophecy/issues", - "source": "https://github.com/Jan0707/phpstan-prophecy/tree/1.0.2" - }, - "time": "2024-04-03T08:15:54+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.12.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3 <3.2.2" - }, - "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpspec/prophecy": "^1.10", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" - }, - "type": "library", - "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2024-06-12T14:39:25+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v5.1.0", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/683130c2ff8c2739f4822ff7ac5c873ec529abd1", - "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-json": "*", - "ext-tokenizer": "*", - "php": ">=7.4" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.1.0" - }, - "time": "2024-07-01T20:03:41+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "54750ef60c58e43759730615a392c31c80e23176" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", - "reference": "54750ef60c58e43759730615a392c31c80e23176", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2024-03-03T12:33:53+00:00" - }, - { - "name": "phar-io/version", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" - }, - "time": "2022-02-21T01:04:05+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.4.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", - "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", - "shasum": "" - }, - "require": { - "doctrine/deprecations": "^1.1", - "ext-filter": "*", - "php": "^7.4 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.7", - "phpstan/phpdoc-parser": "^1.7", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.5", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-mockery": "^1.1", - "phpstan/phpstan-webmozart-assert": "^1.2", - "phpunit/phpunit": "^9.5", - "vimeo/psalm": "^5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.4.1" - }, - "time": "2024-05-21T05:55:05+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.8.2", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "153ae662783729388a584b4361f2545e4d841e3c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/153ae662783729388a584b4361f2545e4d841e3c", - "reference": "153ae662783729388a584b4361f2545e4d841e3c", - "shasum": "" - }, - "require": { - "doctrine/deprecations": "^1.0", - "php": "^7.3 || ^8.0", - "phpdocumentor/reflection-common": "^2.0", - "phpstan/phpdoc-parser": "^1.13" - }, - "require-dev": { - "ext-tokenizer": "*", - "phpbench/phpbench": "^1.2", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-phpunit": "^1.1", - "phpunit/phpunit": "^9.5", - "rector/rector": "^0.13.9", - "vimeo/psalm": "^4.25" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.8.2" - }, - "time": "2024-02-23T11:10:43+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.19.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "67a759e7d8746d501c41536ba40cd9c0a07d6a87" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/67a759e7d8746d501c41536ba40cd9c0a07d6a87", - "reference": "67a759e7d8746d501c41536ba40cd9c0a07d6a87", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2 || ^2.0", - "php": "^7.2 || 8.0.* || 8.1.* || 8.2.* || 8.3.*", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0 || ^5.0 || ^6.0", - "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0 || ^6.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpstan/phpstan": "^1.9", - "phpunit/phpunit": "^8.0 || ^9.0 || ^10.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "dev", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.19.0" - }, - "time": "2024-02-29T11:52:51+00:00" - }, - { - "name": "phpspec/prophecy-phpunit", - "version": "v2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy-phpunit.git", - "reference": "16e1247e139434bce0bac09848bc5c8d882940fc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy-phpunit/zipball/16e1247e139434bce0bac09848bc5c8d882940fc", - "reference": "16e1247e139434bce0bac09848bc5c8d882940fc", - "shasum": "" - }, - "require": { - "php": "^7.3 || ^8", - "phpspec/prophecy": "^1.18", - "phpunit/phpunit": "^9.1 || ^10.1 || ^11.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\PhpUnit\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christophe Coevoet", - "email": "stof@notk.org" - } - ], - "description": "Integrating the Prophecy mocking library in PHPUnit test cases", - "homepage": "http://phpspec.net", - "keywords": [ - "phpunit", - "prophecy" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy-phpunit/issues", - "source": "https://github.com/phpspec/prophecy-phpunit/tree/v2.2.0" - }, - "time": "2024-03-01T08:33:58+00:00" - }, - { - "name": "phpstan/extension-installer", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/phpstan/extension-installer.git", - "reference": "f6b87faf9fc7978eab2f7919a8760bc9f58f9203" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/f6b87faf9fc7978eab2f7919a8760bc9f58f9203", - "reference": "f6b87faf9fc7978eab2f7919a8760bc9f58f9203", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^2.0", - "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.9.0" - }, - "require-dev": { - "composer/composer": "^2.0", - "php-parallel-lint/php-parallel-lint": "^1.2.0", - "phpstan/phpstan-strict-rules": "^0.11 || ^0.12 || ^1.0" - }, - "type": "composer-plugin", - "extra": { - "class": "PHPStan\\ExtensionInstaller\\Plugin" - }, - "autoload": { - "psr-4": { - "PHPStan\\ExtensionInstaller\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Composer plugin for automatic installation of PHPStan extensions", - "support": { - "issues": "https://github.com/phpstan/extension-installer/issues", - "source": "https://github.com/phpstan/extension-installer/tree/1.4.1" - }, - "time": "2024-06-10T08:20:49+00:00" - }, - { - "name": "phpstan/phpdoc-parser", - "version": "1.29.1", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fcaefacf2d5c417e928405b71b400d4ce10daaf4", - "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "doctrine/annotations": "^2.0", - "nikic/php-parser": "^4.15", - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.5", - "phpstan/phpstan-phpunit": "^1.1", - "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^9.5", - "symfony/process": "^5.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "PHPStan\\PhpDocParser\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPDoc parser with support for nullable, intersection and generic types", - "support": { - "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.1" - }, - "time": "2024-05-31T08:52:43+00:00" - }, - { - "name": "phpstan/phpstan", - "version": "1.11.8", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec", - "reference": "6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec", - "shasum": "" - }, - "require": { - "php": "^7.2|^8.0" - }, - "conflict": { - "phpstan/phpstan-shim": "*" - }, - "bin": [ - "phpstan", - "phpstan.phar" - ], - "type": "library", - "autoload": { - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPStan - PHP Static Analysis Tool", - "keywords": [ - "dev", - "static analysis" - ], - "support": { - "docs": "https://phpstan.org/user-guide/getting-started", - "forum": "https://github.com/phpstan/phpstan/discussions", - "issues": "https://github.com/phpstan/phpstan/issues", - "security": "https://github.com/phpstan/phpstan/security/policy", - "source": "https://github.com/phpstan/phpstan-src" - }, - "funding": [ - { - "url": "https://github.com/ondrejmirtes", - "type": "github" - }, - { - "url": "https://github.com/phpstan", - "type": "github" - } - ], - "time": "2024-07-24T07:01:22+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "9.2.31", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcov": "PHP extension that provides line coverage", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-03-02T06:37:42+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "3.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-12-02T12:48:52+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:58:55+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T05:33:50+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:16:10+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "9.6.20", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "49d7820565836236411f5dc002d16dd689cde42f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/49d7820565836236411f5dc002d16dd689cde42f", - "reference": "49d7820565836236411f5dc002d16dd689cde42f", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.5.0 || ^2", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.12.0", - "phar-io/manifest": "^2.0.4", - "phar-io/version": "^3.2.1", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.31", - "phpunit/php-file-iterator": "^3.0.6", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.4", - "phpunit/php-timer": "^5.0.3", - "sebastian/cli-parser": "^1.0.2", - "sebastian/code-unit": "^1.0.8", - "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.6", - "sebastian/environment": "^5.1.5", - "sebastian/exporter": "^4.0.6", - "sebastian/global-state": "^5.0.7", - "sebastian/object-enumerator": "^4.0.4", - "sebastian/resource-operations": "^3.0.4", - "sebastian/type": "^3.2.1", - "sebastian/version": "^3.0.2" - }, - "suggest": { - "ext-soap": "To be able to generate mocks based on WSDL files", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.6-dev" - } - }, - "autoload": { - "files": [ - "src/Framework/Assert/Functions.php" - ], - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.20" - }, - "funding": [ - { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", - "type": "tidelift" - } - ], - "time": "2024-07-10T11:45:39+00:00" - }, - { - "name": "sebastian/cli-parser", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", - "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-03-02T06:27:43+00:00" - }, - { - "name": "sebastian/code-unit", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:08:54+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:30:19+00:00" - }, - { - "name": "sebastian/comparator", - "version": "4.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-09-14T12:41:17+00:00" - }, - { - "name": "sebastian/complexity", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-12-22T06:19:30+00:00" - }, - { - "name": "sebastian/diff", - "version": "4.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-03-02T06:30:58+00:00" - }, - { - "name": "sebastian/environment", - "version": "5.1.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-02-03T06:03:51+00:00" - }, - { - "name": "sebastian/exporter", - "version": "4.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", - "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "https://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-03-02T06:33:00+00:00" - }, - { - "name": "sebastian/global-state", - "version": "5.0.7", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", - "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-03-02T06:35:11+00:00" - }, - { - "name": "sebastian/lines-of-code", - "version": "1.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-12-22T06:20:34+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:12:34+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:14:26+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "4.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "https://github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-02-03T06:07:39+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", - "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-03-14T16:00:52+00:00" - }, - { - "name": "sebastian/type", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-02-03T06:13:03+00:00" - }, - { - "name": "sebastian/version", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:39:44+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "3.10.2", - "source": { - "type": "git", - "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/86e5f5dd9a840c46810ebe5ff1885581c42a3017", - "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" - }, - "bin": [ - "bin/phpcbf", - "bin/phpcs" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "Former lead" - }, - { - "name": "Juliette Reinders Folmer", - "role": "Current lead" - }, - { - "name": "Contributors", - "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards", - "static analysis" - ], - "support": { - "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", - "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", - "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", - "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" - }, - "funding": [ - { - "url": "https://github.com/PHPCSStandards", - "type": "github" - }, - { - "url": "https://github.com/jrfnl", - "type": "github" - }, - { - "url": "https://opencollective.com/php_codesniffer", - "type": "open_collective" - } - ], - "time": "2024-07-21T23:26:44+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.3", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.3" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2024-03-03T12:36:25+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "php": "^7.2 || ^8.0" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.11.0" + "source": "https://github.com/php-fig/log/tree/3.0.2" }, - "time": "2022-06-03T18:03:27+00:00" + "time": "2024-09-11T13:17:53+00:00" } ], + "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": [], diff --git a/standard-integration/server/php/composer.json b/standard-integration/server/php/composer.json index da7111dc..e3135ef3 100644 --- a/standard-integration/server/php/composer.json +++ b/standard-integration/server/php/composer.json @@ -4,26 +4,13 @@ "require": { "php": "^7.4 || ^8.0", "ext-json": "*", - "guzzlehttp/guzzle": "^7.9", - "monolog/monolog": "^2.8", - "php-di/php-di": "^6.4", "paypal/paypal-server-sdk": "0.5.1" }, "require-dev": { - "jangregor/phpstan-prophecy": "^1.0.0", - "phpspec/prophecy-phpunit": "^2.0", - "phpstan/extension-installer": "^1.2.0", - "phpstan/phpstan": "^1.8", - "phpunit/phpunit": "^9.5.26", - "squizlabs/php_codesniffer": "^3.7" }, "scripts": { - "start": "php -S localhost:8080 -t src", - "test": "phpunit" + "start": "php -S localhost:8080 -t src" }, "config": { - "allow-plugins": { - "phpstan/extension-installer": true - } } } \ No newline at end of file diff --git a/standard-integration/server/php/composer.lock b/standard-integration/server/php/composer.lock index f902cfbc..39a01f7b 100644 --- a/standard-integration/server/php/composer.lock +++ b/standard-integration/server/php/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5efc5bdfe116b87d9c0f2661ff4481b2", + "content-hash": "d4a57a266f3f33beef57b02efc8cfaac", "packages": [ { "name": "apimatic/core", @@ -223,363 +223,78 @@ "time": "2023-04-25T14:19:45+00:00" }, { - "name": "guzzlehttp/guzzle", - "version": "7.9.2", + "name": "paypal/paypal-server-sdk", + "version": "0.5.1", "source": { "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b" + "url": "https://github.com/paypal/PayPal-PHP-Server-SDK.git", + "reference": "09148245f72f9dc2f6c8363b6206eac5effefa77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b", + "url": "https://api.github.com/repos/paypal/PayPal-PHP-Server-SDK/zipball/09148245f72f9dc2f6c8363b6206eac5effefa77", + "reference": "09148245f72f9dc2f6c8363b6206eac5effefa77", "shasum": "" }, "require": { + "apimatic/core": "~0.3.11", + "apimatic/core-interfaces": "~0.1.5", + "apimatic/unirest-php": "^4.0.0", "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0.3", - "guzzlehttp/psr7": "^2.7.0", - "php": "^7.2.5 || ^8.0", - "psr/http-client": "^1.0", - "symfony/deprecation-contracts": "^2.2 || ^3.0" - }, - "provide": { - "psr/http-client-implementation": "1.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "ext-curl": "*", - "guzzle/client-integration-tests": "3.0.2", - "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.39 || ^9.6.20", - "psr/log": "^1.1 || ^2.0 || ^3.0" - }, - "suggest": { - "ext-curl": "Required for CURL handler support", - "ext-intl": "Required for Internationalized Domain Name (IDN) support", - "psr/log": "Required for using the Log middleware" - }, - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } - }, - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Jeremy Lindblom", - "email": "jeremeamia@gmail.com", - "homepage": "https://github.com/jeremeamia" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "psr-18", - "psr-7", - "rest", - "web service" - ], - "support": { - "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.9.2" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", - "type": "tidelift" - } - ], - "time": "2024-07-24T11:22:20+00:00" - }, - { - "name": "guzzlehttp/promises", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", - "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", - "shasum": "" - }, - "require": { - "php": "^7.2.5 || ^8.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.39 || ^9.6.20" - }, - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - } - ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ], - "support": { - "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", - "type": "tidelift" - } - ], - "time": "2024-07-18T10:29:17+00:00" - }, - { - "name": "guzzlehttp/psr7", - "version": "2.7.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", - "shasum": "" - }, - "require": { - "php": "^7.2.5 || ^8.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.1 || ^2.0", - "ralouphie/getallheaders": "^3.0" - }, - "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" + "php": "^7.2 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "http-interop/http-factory-tests": "0.9.0", - "phpunit/phpunit": "^8.5.39 || ^9.6.20" - }, - "suggest": { - "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + "phan/phan": "5.4.2", + "squizlabs/php_codesniffer": "^3.5" }, "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } - }, "autoload": { "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" + "PaypalServerSDKLib\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" - ], + "description": "PayPal's SDK for interacting with the REST APIs", + "homepage": "https://github.com/paypal/PayPal-PHP-Server-SDK", "support": { - "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.7.0" + "issues": "https://github.com/paypal/PayPal-PHP-Server-SDK/issues", + "source": "https://github.com/paypal/PayPal-PHP-Server-SDK/tree/0.5.1" }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", - "type": "tidelift" - } - ], - "time": "2024-07-18T11:15:46+00:00" + "time": "2024-09-10T15:31:38+00:00" }, { - "name": "laravel/serializable-closure", - "version": "v1.3.5", + "name": "php-jsonpointer/php-jsonpointer", + "version": "v3.0.2", "source": { "type": "git", - "url": "https://github.com/laravel/serializable-closure.git", - "reference": "1dc4a3dbfa2b7628a3114e43e32120cce7cdda9c" + "url": "https://github.com/raphaelstolt/php-jsonpointer.git", + "reference": "4428f86c6f23846e9faa5a420c4ef14e485b3afb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/1dc4a3dbfa2b7628a3114e43e32120cce7cdda9c", - "reference": "1dc4a3dbfa2b7628a3114e43e32120cce7cdda9c", + "url": "https://api.github.com/repos/raphaelstolt/php-jsonpointer/zipball/4428f86c6f23846e9faa5a420c4ef14e485b3afb", + "reference": "4428f86c6f23846e9faa5a420c4ef14e485b3afb", "shasum": "" }, "require": { - "php": "^7.3|^8.0" + "php": ">=5.4" }, "require-dev": { - "illuminate/support": "^8.0|^9.0|^10.0|^11.0", - "nesbot/carbon": "^2.61|^3.0", - "pestphp/pest": "^1.21.3", - "phpstan/phpstan": "^1.8.2", - "symfony/var-dumper": "^5.4.11|^6.2.0|^7.0.0" + "friendsofphp/php-cs-fixer": "^1.11", + "phpunit/phpunit": "4.6.*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { - "psr-4": { - "Laravel\\SerializableClosure\\": "src/" + "psr-0": { + "Rs\\Json": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -588,92 +303,50 @@ ], "authors": [ { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - }, - { - "name": "Nuno Maduro", - "email": "nuno@laravel.com" + "name": "Raphael Stolt", + "email": "raphael.stolt@gmail.com", + "homepage": "http://raphaelstolt.blogspot.com/" } ], - "description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.", + "description": "Implementation of JSON Pointer (http://tools.ietf.org/html/rfc6901)", + "homepage": "https://github.com/raphaelstolt/php-jsonpointer", "keywords": [ - "closure", - "laravel", - "serializable" + "json", + "json pointer", + "json traversal" ], "support": { - "issues": "https://github.com/laravel/serializable-closure/issues", - "source": "https://github.com/laravel/serializable-closure" + "issues": "https://github.com/raphaelstolt/php-jsonpointer/issues", + "source": "https://github.com/raphaelstolt/php-jsonpointer/tree/master" }, - "time": "2024-09-23T13:33:08+00:00" + "time": "2016-08-29T08:51:01+00:00" }, { - "name": "monolog/monolog", - "version": "2.9.3", + "name": "psr/log", + "version": "3.0.2", "source": { "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "a30bfe2e142720dfa990d0a7e573997f5d884215" + "url": "https://github.com/php-fig/log.git", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/a30bfe2e142720dfa990d0a7e573997f5d884215", - "reference": "a30bfe2e142720dfa990d0a7e573997f5d884215", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", "shasum": "" }, "require": { - "php": ">=7.2", - "psr/log": "^1.0.1 || ^2.0 || ^3.0" - }, - "provide": { - "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^2.4.9 || ^3.0", - "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7 || ^8", - "ext-json": "*", - "graylog2/gelf-php": "^1.4.2 || ^2@dev", - "guzzlehttp/guzzle": "^7.4", - "guzzlehttp/psr7": "^2.2", - "mongodb/mongodb": "^1.8", - "php-amqplib/php-amqplib": "~2.4 || ^3", - "phpspec/prophecy": "^1.15", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^8.5.38 || ^9.6.19", - "predis/predis": "^1.1 || ^2.0", - "rollbar/rollbar": "^1.3 || ^2 || ^3", - "ruflin/elastica": "^7", - "swiftmailer/swiftmailer": "^5.3|^6.0", - "symfony/mailer": "^5.4 || ^6", - "symfony/mime": "^5.4 || ^6" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", - "ext-mbstring": "Allow to work properly with unicode symbols", - "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", - "ext-openssl": "Required to send log messages using SSL", - "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Monolog\\": "src/Monolog" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -682,3112 +355,24 @@ ], "authors": [ { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "https://github.com/Seldaek/monolog", + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", "keywords": [ "log", - "logging", + "psr", "psr-3" ], "support": { - "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.9.3" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", - "type": "tidelift" - } - ], - "time": "2024-04-12T20:52:51+00:00" - }, - { - "name": "paypal/paypal-server-sdk", - "version": "0.5.1", - "source": { - "type": "git", - "url": "https://github.com/paypal/PayPal-PHP-Server-SDK.git", - "reference": "09148245f72f9dc2f6c8363b6206eac5effefa77" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paypal/PayPal-PHP-Server-SDK/zipball/09148245f72f9dc2f6c8363b6206eac5effefa77", - "reference": "09148245f72f9dc2f6c8363b6206eac5effefa77", - "shasum": "" - }, - "require": { - "apimatic/core": "~0.3.11", - "apimatic/core-interfaces": "~0.1.5", - "apimatic/unirest-php": "^4.0.0", - "ext-json": "*", - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "phan/phan": "5.4.2", - "squizlabs/php_codesniffer": "^3.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "PaypalServerSDKLib\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PayPal's SDK for interacting with the REST APIs", - "homepage": "https://github.com/paypal/PayPal-PHP-Server-SDK", - "support": { - "issues": "https://github.com/paypal/PayPal-PHP-Server-SDK/issues", - "source": "https://github.com/paypal/PayPal-PHP-Server-SDK/tree/0.5.1" - }, - "time": "2024-09-10T15:31:38+00:00" - }, - { - "name": "php-di/invoker", - "version": "2.3.4", - "source": { - "type": "git", - "url": "https://github.com/PHP-DI/Invoker.git", - "reference": "33234b32dafa8eb69202f950a1fc92055ed76a86" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHP-DI/Invoker/zipball/33234b32dafa8eb69202f950a1fc92055ed76a86", - "reference": "33234b32dafa8eb69202f950a1fc92055ed76a86", - "shasum": "" + "source": "https://github.com/php-fig/log/tree/3.0.2" }, - "require": { - "php": ">=7.3", - "psr/container": "^1.0|^2.0" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "mnapoli/hard-mode": "~0.3.0", - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Invoker\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Generic and extensible callable invoker", - "homepage": "https://github.com/PHP-DI/Invoker", - "keywords": [ - "callable", - "dependency", - "dependency-injection", - "injection", - "invoke", - "invoker" - ], - "support": { - "issues": "https://github.com/PHP-DI/Invoker/issues", - "source": "https://github.com/PHP-DI/Invoker/tree/2.3.4" - }, - "funding": [ - { - "url": "https://github.com/mnapoli", - "type": "github" - } - ], - "time": "2023-09-08T09:24:21+00:00" - }, - { - "name": "php-di/php-di", - "version": "6.4.0", - "source": { - "type": "git", - "url": "https://github.com/PHP-DI/PHP-DI.git", - "reference": "ae0f1b3b03d8b29dff81747063cbfd6276246cc4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHP-DI/PHP-DI/zipball/ae0f1b3b03d8b29dff81747063cbfd6276246cc4", - "reference": "ae0f1b3b03d8b29dff81747063cbfd6276246cc4", - "shasum": "" - }, - "require": { - "laravel/serializable-closure": "^1.0", - "php": ">=7.4.0", - "php-di/invoker": "^2.0", - "php-di/phpdoc-reader": "^2.0.1", - "psr/container": "^1.0" - }, - "provide": { - "psr/container-implementation": "^1.0" - }, - "require-dev": { - "doctrine/annotations": "~1.10", - "friendsofphp/php-cs-fixer": "^2.4", - "mnapoli/phpunit-easymock": "^1.2", - "ocramius/proxy-manager": "^2.11.2", - "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^9.5" - }, - "suggest": { - "doctrine/annotations": "Install it if you want to use annotations (version ~1.2)", - "ocramius/proxy-manager": "Install it if you want to use lazy injection (version ~2.0)" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions.php" - ], - "psr-4": { - "DI\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "The dependency injection container for humans", - "homepage": "https://php-di.org/", - "keywords": [ - "PSR-11", - "container", - "container-interop", - "dependency injection", - "di", - "ioc", - "psr11" - ], - "support": { - "issues": "https://github.com/PHP-DI/PHP-DI/issues", - "source": "https://github.com/PHP-DI/PHP-DI/tree/6.4.0" - }, - "funding": [ - { - "url": "https://github.com/mnapoli", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/php-di/php-di", - "type": "tidelift" - } - ], - "time": "2022-04-09T16:46:38+00:00" - }, - { - "name": "php-di/phpdoc-reader", - "version": "2.2.1", - "source": { - "type": "git", - "url": "https://github.com/PHP-DI/PhpDocReader.git", - "reference": "66daff34cbd2627740ffec9469ffbac9f8c8185c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHP-DI/PhpDocReader/zipball/66daff34cbd2627740ffec9469ffbac9f8c8185c", - "reference": "66daff34cbd2627740ffec9469ffbac9f8c8185c", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "require-dev": { - "mnapoli/hard-mode": "~0.3.0", - "phpunit/phpunit": "^8.5|^9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "PhpDocReader\\": "src/PhpDocReader" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PhpDocReader parses @var and @param values in PHP docblocks (supports namespaced class names with the same resolution rules as PHP)", - "keywords": [ - "phpdoc", - "reflection" - ], - "support": { - "issues": "https://github.com/PHP-DI/PhpDocReader/issues", - "source": "https://github.com/PHP-DI/PhpDocReader/tree/2.2.1" - }, - "time": "2020-10-12T12:39:22+00:00" - }, - { - "name": "php-jsonpointer/php-jsonpointer", - "version": "v3.0.2", - "source": { - "type": "git", - "url": "https://github.com/raphaelstolt/php-jsonpointer.git", - "reference": "4428f86c6f23846e9faa5a420c4ef14e485b3afb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/raphaelstolt/php-jsonpointer/zipball/4428f86c6f23846e9faa5a420c4ef14e485b3afb", - "reference": "4428f86c6f23846e9faa5a420c4ef14e485b3afb", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^1.11", - "phpunit/phpunit": "4.6.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Rs\\Json": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Raphael Stolt", - "email": "raphael.stolt@gmail.com", - "homepage": "http://raphaelstolt.blogspot.com/" - } - ], - "description": "Implementation of JSON Pointer (http://tools.ietf.org/html/rfc6901)", - "homepage": "https://github.com/raphaelstolt/php-jsonpointer", - "keywords": [ - "json", - "json pointer", - "json traversal" - ], - "support": { - "issues": "https://github.com/raphaelstolt/php-jsonpointer/issues", - "source": "https://github.com/raphaelstolt/php-jsonpointer/tree/master" - }, - "time": "2016-08-29T08:51:01+00:00" - }, - { - "name": "psr/container", - "version": "1.1.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" - }, - "time": "2021-11-05T16:50:12+00:00" - }, - { - "name": "psr/http-client", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-client.git", - "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", - "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", - "shasum": "" - }, - "require": { - "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0 || ^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP clients", - "homepage": "https://github.com/php-fig/http-client", - "keywords": [ - "http", - "http-client", - "psr", - "psr-18" - ], - "support": { - "source": "https://github.com/php-fig/http-client" - }, - "time": "2023-09-23T14:17:50+00:00" - }, - { - "name": "psr/http-factory", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", - "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", - "shasum": "" - }, - "require": { - "php": ">=7.1", - "psr/http-message": "^1.0 || ^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-factory" - }, - "time": "2024-04-15T12:06:14+00:00" - }, - { - "name": "psr/http-message", - "version": "2.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-message/tree/2.0" - }, - "time": "2023-04-04T09:54:51+00:00" - }, - { - "name": "psr/log", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", - "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/3.0.2" - }, - "time": "2024-09-11T13:17:53+00:00" - }, - { - "name": "ralouphie/getallheaders", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "120b605dfeb996808c31b6477290a714d356e822" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", - "reference": "120b605dfeb996808c31b6477290a714d356e822", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^5 || ^6.5" - }, - "type": "library", - "autoload": { - "files": [ - "src/getallheaders.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" - } - ], - "description": "A polyfill for getallheaders.", - "support": { - "issues": "https://github.com/ralouphie/getallheaders/issues", - "source": "https://github.com/ralouphie/getallheaders/tree/develop" - }, - "time": "2019-03-08T08:55:37+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v3.5.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-04-18T09:32:20+00:00" - } - ], - "packages-dev": [ - { - "name": "doctrine/deprecations", - "version": "1.1.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/deprecations.git", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "phpstan/phpstan": "1.4.10 || 1.10.15", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "0.18.4", - "psr/log": "^1 || ^2 || ^3", - "vimeo/psalm": "4.30.0 || 5.12.0" - }, - "suggest": { - "psr/log": "Allows logging deprecations via PSR-3 logger implementation" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", - "homepage": "https://www.doctrine-project.org/", - "support": { - "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.3" - }, - "time": "2024-01-30T19:34:25+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "doctrine/coding-standard": "^11", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.5.27", - "vimeo/psalm": "^5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/2.0.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-12-30T00:23:10+00:00" - }, - { - "name": "jangregor/phpstan-prophecy", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/Jan0707/phpstan-prophecy.git", - "reference": "5ee56c7db1d58f0578c82a35e3c1befe840e85a9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Jan0707/phpstan-prophecy/zipball/5ee56c7db1d58f0578c82a35e3c1befe840e85a9", - "reference": "5ee56c7db1d58f0578c82a35e3c1befe840e85a9", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0", - "phpstan/phpstan": "^1.0.0" - }, - "conflict": { - "phpspec/prophecy": "<1.7.0 || >=2.0.0", - "phpunit/phpunit": "<6.0.0 || >=12.0.0" - }, - "require-dev": { - "ergebnis/composer-normalize": "^2.1.1", - "ergebnis/license": "^1.0.0", - "ergebnis/php-cs-fixer-config": "~2.2.0", - "phpspec/prophecy": "^1.7.0", - "phpunit/phpunit": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0" - }, - "type": "phpstan-extension", - "extra": { - "phpstan": { - "includes": [ - "extension.neon" - ] - } - }, - "autoload": { - "psr-4": { - "JanGregor\\Prophecy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jan Gregor Emge-Triebel", - "email": "jan@jangregor.me" - } - ], - "description": "Provides a phpstan/phpstan extension for phpspec/prophecy", - "support": { - "issues": "https://github.com/Jan0707/phpstan-prophecy/issues", - "source": "https://github.com/Jan0707/phpstan-prophecy/tree/1.0.2" - }, - "time": "2024-04-03T08:15:54+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.12.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3 <3.2.2" - }, - "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpspec/prophecy": "^1.10", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" - }, - "type": "library", - "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2024-06-12T14:39:25+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v5.2.0", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb", - "reference": "23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-json": "*", - "ext-tokenizer": "*", - "php": ">=7.4" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.2.0" - }, - "time": "2024-09-15T16:40:33+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "54750ef60c58e43759730615a392c31c80e23176" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", - "reference": "54750ef60c58e43759730615a392c31c80e23176", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2024-03-03T12:33:53+00:00" - }, - { - "name": "phar-io/version", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" - }, - "time": "2022-02-21T01:04:05+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.4.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", - "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", - "shasum": "" - }, - "require": { - "doctrine/deprecations": "^1.1", - "ext-filter": "*", - "php": "^7.4 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.7", - "phpstan/phpdoc-parser": "^1.7", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.5", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-mockery": "^1.1", - "phpstan/phpstan-webmozart-assert": "^1.2", - "phpunit/phpunit": "^9.5", - "vimeo/psalm": "^5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.4.1" - }, - "time": "2024-05-21T05:55:05+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.8.2", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "153ae662783729388a584b4361f2545e4d841e3c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/153ae662783729388a584b4361f2545e4d841e3c", - "reference": "153ae662783729388a584b4361f2545e4d841e3c", - "shasum": "" - }, - "require": { - "doctrine/deprecations": "^1.0", - "php": "^7.3 || ^8.0", - "phpdocumentor/reflection-common": "^2.0", - "phpstan/phpdoc-parser": "^1.13" - }, - "require-dev": { - "ext-tokenizer": "*", - "phpbench/phpbench": "^1.2", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-phpunit": "^1.1", - "phpunit/phpunit": "^9.5", - "rector/rector": "^0.13.9", - "vimeo/psalm": "^4.25" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.8.2" - }, - "time": "2024-02-23T11:10:43+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.19.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "67a759e7d8746d501c41536ba40cd9c0a07d6a87" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/67a759e7d8746d501c41536ba40cd9c0a07d6a87", - "reference": "67a759e7d8746d501c41536ba40cd9c0a07d6a87", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2 || ^2.0", - "php": "^7.2 || 8.0.* || 8.1.* || 8.2.* || 8.3.*", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0 || ^5.0 || ^6.0", - "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0 || ^6.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpstan/phpstan": "^1.9", - "phpunit/phpunit": "^8.0 || ^9.0 || ^10.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "dev", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.19.0" - }, - "time": "2024-02-29T11:52:51+00:00" - }, - { - "name": "phpspec/prophecy-phpunit", - "version": "v2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy-phpunit.git", - "reference": "16e1247e139434bce0bac09848bc5c8d882940fc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy-phpunit/zipball/16e1247e139434bce0bac09848bc5c8d882940fc", - "reference": "16e1247e139434bce0bac09848bc5c8d882940fc", - "shasum": "" - }, - "require": { - "php": "^7.3 || ^8", - "phpspec/prophecy": "^1.18", - "phpunit/phpunit": "^9.1 || ^10.1 || ^11.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\PhpUnit\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christophe Coevoet", - "email": "stof@notk.org" - } - ], - "description": "Integrating the Prophecy mocking library in PHPUnit test cases", - "homepage": "http://phpspec.net", - "keywords": [ - "phpunit", - "prophecy" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy-phpunit/issues", - "source": "https://github.com/phpspec/prophecy-phpunit/tree/v2.2.0" - }, - "time": "2024-03-01T08:33:58+00:00" - }, - { - "name": "phpstan/extension-installer", - "version": "1.4.3", - "source": { - "type": "git", - "url": "https://github.com/phpstan/extension-installer.git", - "reference": "85e90b3942d06b2326fba0403ec24fe912372936" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/85e90b3942d06b2326fba0403ec24fe912372936", - "reference": "85e90b3942d06b2326fba0403ec24fe912372936", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^2.0", - "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.9.0 || ^2.0" - }, - "require-dev": { - "composer/composer": "^2.0", - "php-parallel-lint/php-parallel-lint": "^1.2.0", - "phpstan/phpstan-strict-rules": "^0.11 || ^0.12 || ^1.0" - }, - "type": "composer-plugin", - "extra": { - "class": "PHPStan\\ExtensionInstaller\\Plugin" - }, - "autoload": { - "psr-4": { - "PHPStan\\ExtensionInstaller\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Composer plugin for automatic installation of PHPStan extensions", - "keywords": [ - "dev", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpstan/extension-installer/issues", - "source": "https://github.com/phpstan/extension-installer/tree/1.4.3" - }, - "time": "2024-09-04T20:21:43+00:00" - }, - { - "name": "phpstan/phpdoc-parser", - "version": "1.31.0", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "249f15fb843bf240cf058372dad29e100cee6c17" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/249f15fb843bf240cf058372dad29e100cee6c17", - "reference": "249f15fb843bf240cf058372dad29e100cee6c17", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "doctrine/annotations": "^2.0", - "nikic/php-parser": "^4.15", - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.5", - "phpstan/phpstan-phpunit": "^1.1", - "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^9.5", - "symfony/process": "^5.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "PHPStan\\PhpDocParser\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPDoc parser with support for nullable, intersection and generic types", - "support": { - "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.31.0" - }, - "time": "2024-09-22T11:32:18+00:00" - }, - { - "name": "phpstan/phpstan", - "version": "1.12.4", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "ffa517cb918591b93acc9b95c0bebdcd0e4538bd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ffa517cb918591b93acc9b95c0bebdcd0e4538bd", - "reference": "ffa517cb918591b93acc9b95c0bebdcd0e4538bd", - "shasum": "" - }, - "require": { - "php": "^7.2|^8.0" - }, - "conflict": { - "phpstan/phpstan-shim": "*" - }, - "bin": [ - "phpstan", - "phpstan.phar" - ], - "type": "library", - "autoload": { - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPStan - PHP Static Analysis Tool", - "keywords": [ - "dev", - "static analysis" - ], - "support": { - "docs": "https://phpstan.org/user-guide/getting-started", - "forum": "https://github.com/phpstan/phpstan/discussions", - "issues": "https://github.com/phpstan/phpstan/issues", - "security": "https://github.com/phpstan/phpstan/security/policy", - "source": "https://github.com/phpstan/phpstan-src" - }, - "funding": [ - { - "url": "https://github.com/ondrejmirtes", - "type": "github" - }, - { - "url": "https://github.com/phpstan", - "type": "github" - } - ], - "time": "2024-09-19T07:58:01+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "9.2.32", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", - "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^4.19.1 || ^5.1.0", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.6", - "phpunit/php-text-template": "^2.0.4", - "sebastian/code-unit-reverse-lookup": "^2.0.3", - "sebastian/complexity": "^2.0.3", - "sebastian/environment": "^5.1.5", - "sebastian/lines-of-code": "^1.0.4", - "sebastian/version": "^3.0.2", - "theseer/tokenizer": "^1.2.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.6" - }, - "suggest": { - "ext-pcov": "PHP extension that provides line coverage", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "9.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-08-22T04:23:01+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "3.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-12-02T12:48:52+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:58:55+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T05:33:50+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:16:10+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "9.6.21", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", - "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.5.0 || ^2", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.12.0", - "phar-io/manifest": "^2.0.4", - "phar-io/version": "^3.2.1", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.32", - "phpunit/php-file-iterator": "^3.0.6", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.4", - "phpunit/php-timer": "^5.0.3", - "sebastian/cli-parser": "^1.0.2", - "sebastian/code-unit": "^1.0.8", - "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.6", - "sebastian/environment": "^5.1.5", - "sebastian/exporter": "^4.0.6", - "sebastian/global-state": "^5.0.7", - "sebastian/object-enumerator": "^4.0.4", - "sebastian/resource-operations": "^3.0.4", - "sebastian/type": "^3.2.1", - "sebastian/version": "^3.0.2" - }, - "suggest": { - "ext-soap": "To be able to generate mocks based on WSDL files", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.6-dev" - } - }, - "autoload": { - "files": [ - "src/Framework/Assert/Functions.php" - ], - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.21" - }, - "funding": [ - { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", - "type": "tidelift" - } - ], - "time": "2024-09-19T10:50:18+00:00" - }, - { - "name": "sebastian/cli-parser", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", - "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-03-02T06:27:43+00:00" - }, - { - "name": "sebastian/code-unit", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:08:54+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:30:19+00:00" - }, - { - "name": "sebastian/comparator", - "version": "4.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-09-14T12:41:17+00:00" - }, - { - "name": "sebastian/complexity", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-12-22T06:19:30+00:00" - }, - { - "name": "sebastian/diff", - "version": "4.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-03-02T06:30:58+00:00" - }, - { - "name": "sebastian/environment", - "version": "5.1.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-02-03T06:03:51+00:00" - }, - { - "name": "sebastian/exporter", - "version": "4.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", - "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "https://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-03-02T06:33:00+00:00" - }, - { - "name": "sebastian/global-state", - "version": "5.0.7", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", - "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-03-02T06:35:11+00:00" - }, - { - "name": "sebastian/lines-of-code", - "version": "1.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-12-22T06:20:34+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:12:34+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:14:26+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "4.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "https://github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-02-03T06:07:39+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", - "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-03-14T16:00:52+00:00" - }, - { - "name": "sebastian/type", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-02-03T06:13:03+00:00" - }, - { - "name": "sebastian/version", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:39:44+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "3.10.3", - "source": { - "type": "git", - "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "62d32998e820bddc40f99f8251958aed187a5c9c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/62d32998e820bddc40f99f8251958aed187a5c9c", - "reference": "62d32998e820bddc40f99f8251958aed187a5c9c", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" - }, - "bin": [ - "bin/phpcbf", - "bin/phpcs" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "Former lead" - }, - { - "name": "Juliette Reinders Folmer", - "role": "Current lead" - }, - { - "name": "Contributors", - "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards", - "static analysis" - ], - "support": { - "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", - "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", - "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", - "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" - }, - "funding": [ - { - "url": "https://github.com/PHPCSStandards", - "type": "github" - }, - { - "url": "https://github.com/jrfnl", - "type": "github" - }, - { - "url": "https://opencollective.com/php_codesniffer", - "type": "open_collective" - } - ], - "time": "2024-09-18T10:38:58+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.3", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.3" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2024-03-03T12:36:25+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "php": "^7.2 || ^8.0" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.11.0" - }, - "time": "2022-06-03T18:03:27+00:00" + "time": "2024-09-11T13:17:53+00:00" } ], + "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": [], diff --git a/standard-integration/server/php/src/index.php b/standard-integration/server/php/src/index.php index 51dc2fc4..8f000133 100644 --- a/standard-integration/server/php/src/index.php +++ b/standard-integration/server/php/src/index.php @@ -32,7 +32,7 @@ function createOrder($cart) $orderBody = [ 'body' => OrderRequestBuilder::init( - 'AUTHORIZE', + CheckoutPaymentIntent::CAPTURE, [ PurchaseUnitRequestBuilder::init( AmountWithBreakdownBuilder::init( From c964b7083a62e76886251f34dd822fb02258b3c6 Mon Sep 17 00:00:00 2001 From: "Devon Apple (PayPal)" Date: Tue, 8 Oct 2024 20:40:44 -0700 Subject: [PATCH 18/18] 20241008_rename_sample_standard_xo_dotnet_file (#6) * Update README.md --- advanced-integration/v2/server/dotnet/README.md | 2 +- advanced-integration/v2/server/java/README.md | 2 +- advanced-integration/v2/server/node/README.md | 2 +- ...ancedIntegration.csproj => PayPalStandardIntegration.csproj} | 0 standard-integration/server/dotnet/README.md | 2 +- standard-integration/server/java/README.md | 2 +- standard-integration/server/node/README.md | 2 +- 7 files changed, 6 insertions(+), 6 deletions(-) rename standard-integration/server/dotnet/{PayPalAdvancedIntegration.csproj => PayPalStandardIntegration.csproj} (100%) diff --git a/advanced-integration/v2/server/dotnet/README.md b/advanced-integration/v2/server/dotnet/README.md index b6b09826..6170999e 100644 --- a/advanced-integration/v2/server/dotnet/README.md +++ b/advanced-integration/v2/server/dotnet/README.md @@ -1,4 +1,4 @@ -# Advanced Integartion .NET Sample +# Advanced Integration .NET Sample PayPal Advanced Integration sample in .NET diff --git a/advanced-integration/v2/server/java/README.md b/advanced-integration/v2/server/java/README.md index 93d911cb..d88ad4a2 100644 --- a/advanced-integration/v2/server/java/README.md +++ b/advanced-integration/v2/server/java/README.md @@ -1,4 +1,4 @@ -# Advanced Integartion Java Sample +# Advanced Integration Java Sample PayPal Advanced Integration sample in Java diff --git a/advanced-integration/v2/server/node/README.md b/advanced-integration/v2/server/node/README.md index 2dba034b..e2c1f93e 100644 --- a/advanced-integration/v2/server/node/README.md +++ b/advanced-integration/v2/server/node/README.md @@ -1,4 +1,4 @@ -# Advanced Integartion Node.js Sample +# Advanced Integration Node.js Sample PayPal Advanced Integration sample in Node.js diff --git a/standard-integration/server/dotnet/PayPalAdvancedIntegration.csproj b/standard-integration/server/dotnet/PayPalStandardIntegration.csproj similarity index 100% rename from standard-integration/server/dotnet/PayPalAdvancedIntegration.csproj rename to standard-integration/server/dotnet/PayPalStandardIntegration.csproj diff --git a/standard-integration/server/dotnet/README.md b/standard-integration/server/dotnet/README.md index 24040c3c..2405572a 100644 --- a/standard-integration/server/dotnet/README.md +++ b/standard-integration/server/dotnet/README.md @@ -1,4 +1,4 @@ -# Standard Integartion .NET Sample +# Standard Integration .NET Sample PayPal Standard Integration sample in .NET diff --git a/standard-integration/server/java/README.md b/standard-integration/server/java/README.md index 52ace294..1a242c7a 100644 --- a/standard-integration/server/java/README.md +++ b/standard-integration/server/java/README.md @@ -1,4 +1,4 @@ -# Standard Integartion Java Sample +# Standard Integration Java Sample PayPal Standard Integration sample in Java diff --git a/standard-integration/server/node/README.md b/standard-integration/server/node/README.md index ef76e297..81657297 100644 --- a/standard-integration/server/node/README.md +++ b/standard-integration/server/node/README.md @@ -1,4 +1,4 @@ -# Standard Integartion Node.js Sample +# Standard Integration Node.js Sample PayPal Standard Integration sample in Node.js