Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Feature/36803 minor updates workflow collection #91

Merged
merged 13 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 21 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,36 @@ This is a [connect application](https://marketplace.commercetools.com/) to integ

[PayPal commercetools connector](https://marketplace.commercetools.com/integration/paypal) is available in the commercetools marketplace.

The connector must be used together with [PayPal client api](https://www.npmjs.com/package/paypal-commercetools-client) for the frontend integration.
The payments demo can be seen at https://poc-mediaopt2.frontend.site/.

The payments demo and integration to the commercetools frontend can be seen at https://poc-mediaopt2.frontend.site/ and [github](https://github.com/mediaopt/paypal-commercetools-cofe-integration).
## Integration
The connector is supposed to be used together with the PayPal client app. The client is available at [npm](https://www.npmjs.com/package/paypal-commercetools-client) and [github](https://github.com/mediaopt/paypal-commercetools-client). 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](https://developer.paypal.com/sdk/js/) should be used instead. The example of the integration with commercetools frontend is covered in [docs/usecases/README.md](docs/workflows/README.md) and the code can be seen in [github](https://github.com/mediaopt/paypal-commercetools-cofe-integration).

## Prerequisites

To use the connector you need to have the following:

- commercetools Composable Commerce account and [API client](https://docs.commercetools.com/api/projects/api-clients#apiclient) credentials, namely:
- 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
- [PayPal business customer account](https://www.google.com/aclk?sa=l&ai=DChcSEwjPz82wyK2GAxWSiVAGHUwzAVoYABABGgJkZw&gclid=Cj0KCQjw3tCyBhDBARIsAEY0XNnOcx462M0ej3RizrdN9a_6fl2O5_bfwVqOOzyHxz_9M7L10B8NfL0aAgA6EALw_wcB&sig=AOD64_0bOBSNaFhCg-wypewofyWkrpoBWg&q&adurl&ved=2ahUKEwiIqcewyK2GAxXlSkEAHejBBbQQqyQoAHoECAIQDA) and [API client](https://developer.paypal.com/api/rest/#link-getclientidandclientsecret) credentials,namely:
- 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)

| 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 |

- [PayPal business customer account](https://www.paypal.com/de/business/getting-started) and [API client](https://developer.paypal.com/api/rest/#link-getclientidandclientsecret) credentials,namely:

| 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](https://docs.commercetools.com/merchant-center/connect).
The connector can be installed [directly from the commercetools marketplace](https://docs.commercetools.com/merchant-center/connect) or deployed from github repository via [commercetools Connect API](https://docs.commercetools.com/connect/).

To run the connector locally:

Expand All @@ -62,4 +70,4 @@ 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)
- Postman collection for testing the backend workflows for different payment methods (PayPal-commercetools-workflows.postman_collection.json)
- workflows folder with examples how to use the connector individually or together with PayPal client and commercetools frontend
48 changes: 24 additions & 24 deletions docs/PayPal.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ Please see [http://docs.commercetools.com/](http://docs.commercetools.com/) for

* [Authorization](#authorization)
1. [Obtain access token](#1-obtain-access-token)
1. [Obtain access token through password flow](#2-obtain-access-token-through-password-flow)
1. [Token for Anonymous Sessions](#3-token-for-anonymous-sessions)
1. [Token Introspection](#4-token-introspection)
2. [Obtain access token through password flow](#2-obtain-access-token-through-password-flow)
3. [Token for Anonymous Sessions](#3-token-for-anonymous-sessions)
4. [Token Introspection](#4-token-introspection)
* [PayPal](#paypal)
1. [CreateOrder](#1-createorder)
* [PayUponInvoice](#i-example-request-payuponinvoice)
Expand All @@ -43,27 +43,27 @@ Please see [http://docs.commercetools.com/](http://docs.commercetools.com/) for
* [Card](#iv-example-request-card)
* [Google Pay](#v-example-request-google-pay)
* [Apple Pay](#vi-example-request-apple-pay)
1. [getClientToken](#2-getclienttoken)
1. [CaptureOrder](#3-captureorder)
1. [CaptureAuthorization](#4-captureauthorization)
1. [AuthorizeOrder](#5-authorizeorder)
1. [GetOrder](#6-getorder)
1. [GetCapture](#7-getcapture)
1. [createTrackingInformation](#8-createtrackinginformation)
1. [updateTrackingInformation](#9-updatetrackinginformation)
1. [UpdateOrder](#10-updateorder)
1. [SetCustomType For Payment](#11-setcustomtype-for-payment)
1. [SetCustomType For Customer](#12-setcustomtype-for-customer)
1. [GetSettings](#13-getsettings)
1. [Refund](#14-refund)
1. [Partial Refund](#15-partial-refund)
1. [CreateVaultSetupToken](#16-createvaultsetuptoken)
* [Card](#i-example-request-card)
* [PayPal](#ii-example-request-paypal-1)
1. [getUserIdToken](#17-getuseridtoken)
1. [createPaymentToken](#18-createpaymenttoken)
1. [getPaymentTokens](#19-getpaymenttokens)
1. [deletePaymentToken](#20-deletepaymenttoken)
2. [getClientToken](#2-getclienttoken)
3. [CaptureOrder](#3-captureorder)
4. [CaptureAuthorization](#4-captureauthorization)
5. [AuthorizeOrder](#5-authorizeorder)
6. [GetOrder](#6-getorder)
7. [GetCapture](#7-getcapture)
8. [createTrackingInformation](#8-createtrackinginformation)
9. [updateTrackingInformation](#9-updatetrackinginformation)
10. [UpdateOrder](#10-updateorder)
11. [SetCustomType For Payment](#11-setcustomtype-for-payment)
12. [SetCustomType For Customer](#12-setcustomtype-for-customer)
13. [GetSettings](#13-getsettings)
14. [Refund](#14-refund)
15. [Partial Refund](#15-partial-refund)
16. [CreateVaultSetupToken](#16-createvaultsetuptoken)
* [Card](#i-example-request-card)
* [PayPal](#ii-example-request-paypal-1)
17. [getUserIdToken](#17-getuseridtoken)
18. [createPaymentToken](#18-createpaymenttoken)
19. [getPaymentTokens](#19-getpaymenttokens)
20. [deletePaymentToken](#20-deletepaymenttoken)

--------

Expand Down
Loading
Loading