Skip to content

Commit

Permalink
Setup auto complete configurations, setup and install
Browse files Browse the repository at this point in the history
  • Loading branch information
Palourde007 committed Jan 1, 2025
1 parent a577f32 commit d075411
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// For more details, see https://aka.ms/devcontainer.json.
{
"name": "Apple Pay",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}/",
Expand Down Expand Up @@ -28,6 +27,10 @@
"MERCHANT_ID":{
"description": "Sandbox merchant ID of the application.",
"documentationUrl": "https://www.sandbox.paypal.com/businessmanage/account/aboutBusiness"
},
"CLIENT_SECRET": {
"description": "Sandbox client secret of the application.",
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox"
}
},
"customizations": {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
CLIENT_ID: ${{secrets.CLIENT_ID}}
APP_SECRET: ${{secrets.APP_SECRET}}
CLIENT_SECRET: ${{secrets.CLIENT_SECRET}}
MERCHANT_ID: ${{secrets.MERCHANT_ID}}
MERCHANT_ID: ${{secrets.MERCHANT_ID}}
1 change: 0 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ jobs:
run: cd advanced-integration && npm install
- name: Run ESLint
run: cd advanced-integration && npm run lint

50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,53 @@ You can read more about codespaces in the [PayPal Developer Docs](https://develo

* To report a bug or suggest a new feature, create an [issue in GitHub](https://github.com/paypal-examples/paypaldevsupport/issues/new/choose).
* To submit feedback, go to [PayPal Developer Docs](https://developer.paypal.com/api/rest/sandbox/codespaces) and select the "Feedback" tab

## Setting up a Development Container

To set up a development container with necessary configurations and secrets, follow these steps:

1. Install the [Visual Studio Code Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers).
2. Open the project in Visual Studio Code.
3. Press `F1` and select `Remote-Containers: Open Folder in Container...`.
4. Select the project folder.
5. The development container will be built and started automatically.

## Deploying the Application to Heroku

To deploy the application to Heroku, follow these steps:

1. Create a Heroku account at [https://www.heroku.com/](https://www.heroku.com/).
2. Install the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli).
3. Log in to your Heroku account using the Heroku CLI: `heroku login`.
4. Create a new Heroku app: `heroku create <app-name>`.
5. Set the required environment variables in your Heroku app:
```sh
heroku config:set CLIENT_ID=<your-client-id>
heroku config:set APP_SECRET=<your-app-secret>
heroku config:set CLIENT_SECRET=<your-client-secret>
heroku config:set MERCHANT_ID=<your-merchant-id>
```
6. Push the code to Heroku: `git push heroku main`.

## Running ESLint on Push and Pull Request Events

To run ESLint on push and pull request events, follow these steps:

1. Ensure that ESLint is installed and configured in your project.
2. Create a GitHub Actions workflow file at `.github/workflows/lint.yml` with the following content:
```yaml
name: Lint
on: [push, pull_request]
jobs:
build-advanced-integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install JS Dependencies
run: cd advanced-integration && npm install
- name: Run ESLint
run: cd advanced-integration && npm run lint
```

0 comments on commit d075411

Please sign in to comment.