Skip to content

mediaopt/paypal-commercetools-connector

Repository files navigation

build test audit

commercetools logo
PayPal logo

This is a connect application to integrate PayPal payment methods and package tracking into Commercetools. It follows the folder structure to ensure certification & deployment from commercetools connect team as stated here.

PayPal commercetools connector is available in the commercetools marketplace.

The payments demo can be seen at https://poc-mediaopt2.frontend.site/.

Integration

The connector is supposed to be used together with the PayPal client app. The client is available at npm and github. The connector is responsible for the backend integration with commercetools and PayPal, while the client is responsible for the frontend. If for some reasons the PayPal client app can't be used, the PayPal JS SDK should be used instead. The example of the integration with commercetools frontend is covered in docs/usecases/README.md and the code can be seen in github.

Prerequisites

To use the connector you need to have the following:

  • commercetools Composable Commerce account and API client credentials, namely:
credential environmental variable description
region CTP_REGION region, in which your commercetools project is hosted
project key CTP_PROJECT_KEY) the key of your commercetools project
client ID CTP_CLIENT_ID) the ID of your commercetools API client
client secret CTP_CLIENT_SECRET the secret of your commercetools API client
scope CTP_SCOPE the scope of your commercetools API client
credential environmental variable description
client ID PAYPAL_CLIENT_ID the ID of your PayPal API client
client secret PAYPAL_CLIENT_SECRET the secret of your PayPal API client
environment PAYPAL_ENVIRONMENT the environment of your PayPal API client (production or sandbox)

Instructions

The connector can be installed directly from the commercetools marketplace or deployed from github repository via commercetools Connect API.

To run the connector locally:

  • cd paypal-commercetools-extension or cd paypal-commercetools-events
  • run yarn to install the dependencies
  • insert commercetools and PayPal credentials to .env file
  • for paypal-commercetools-extension run ./bin/ngrok.sh to start ngrok and insert the dynamic url in the .env file as specified in post-deploy script
  • for paypal-commercetools-extension run yarn connector:post-deploy to register the extension with the public ngrok url
  • run ỳarn start:dev to build the application

Technology Stack

The connector is written in TypeScript and yarn is used as the package manager.

Contributing

Feel free to contribute to the project by opening an issue.

Additional information

In the docs folder you can find:

  • description of each application included (README.md)
  • architecture of the connector (Architecture.pdf)
  • documented PayPal Commercetools API Postman collection (PayPal.md, paypal.postman_collection.json)
  • workflows folder with examples how to use the connector individually or together with PayPal client and commercetools frontend

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages