diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f18c478 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,33 @@ +# Contributing to the PAYONE Commerce Platform Java SDK + +Thank you for considering contributing to the PAYONE Commerce Platform Java SDK! We appreciate your efforts to help improve this project. Below are guidelines for contributing. + +## How to Contribute + +### Pull Requests + +We welcome pull requests! Please follow these steps to submit one: + +1. **Fork** the repository and create your branch from `main`. +2. **Install** any dependencies and ensure the project builds and passes tests. + + ```sh + ./gradlew :lib:build + ``` + +3. **Develop** your changes. +4. **Test** your changes thoroughly. + ```sh + ./gradlew :lib:test + # or for coverage + ./gradlew :lib:jacocoTestReport + ``` +5. **Write** clear, concise, and self-explanatory commit messages. +6. **Open** a pull request with a clear title and description of what your change does. + +### Reporting Bugs + +If you encounter any bugs, please report them using one of the following methods: + +1. **Issue Tracker**: Submit an issue through our [issues tracker](https://github.com/PAYONE-GmbH/PCP-ServerSDK-java/issues/new). +2. **Security Issues**: For security-related issues, please contact our IT support via email at tech.support@payone.com with a clear subject line indicating that it is a security issue. This ensures that the issue will be visible to and handled by the PAYONE tech support team. diff --git a/README.md b/README.md index 2308c36..38a7e0d 100644 --- a/README.md +++ b/README.md @@ -11,19 +11,18 @@ Welcome to the Java SDK for the PAYONE Commerce Platform! This repository contai - [Features](#features) - [Installation](#installation) - [Usage](#usage) + - [General](#general) - [Error Handling](#error-handling) - [Client Side](#client-side) - [Apple Pay](#apple-pay) - [Demo App](#demo-app) - [Contributing](#contributing) - - [Build the library](#build-the-library) - - [Run tests](#run-tests) - - [Releasing the library](#releasing-the-library) - - [Preparing the Release](#preparing-the-release) - - [Changelog Generation with Conventional Changelog](#changelog-generation-with-conventional-changelog) - - [Merging the Release Branch](#merging-the-release-branch) - - [GitHub Action for Release](#github-action-for-release) - - [Optional: Creating a GitHub Release](#optional-creating-a-github-release) +- [Releasing the library](#releasing-the-library) + - [Preparing the Release](#preparing-the-release) + - [Changelog Generation with Conventional Changelog](#changelog-generation-with-conventional-changelog) + - [Merging the Release Branch](#merging-the-release-branch) + - [GitHub Action for Release](#github-action-for-release) + - [Optional: Creating a GitHub Release](#optional-creating-a-github-release) - [License](#license) ## Features @@ -41,10 +40,14 @@ dependencies { } ``` +**[back to top](#table-of-contents)** + ## Usage You can find examples and detailed usage in the [examples](./app/src/main/java/com/payone/commerce/platform/app/examples/) directory. +### General + To use this SDK you need to construct a `CommunicatorConfiguration` which encapsulate everything needed to connect to the PAYONE Commerce Platform. ```java @@ -178,6 +181,8 @@ class App { } ``` +**[back to top](#table-of-contents)** + ## Demo App This repo contains a demo app that showcases how to implement common use cases, like a [Step-by-Step Checkout](https://docs.payone.com/pcp/checkout-flows/step-by-step-checkout) and an [One-Stop-Checkout](https://docs.payone.com/pcp/checkout-flows/one-step-checkout). For each use case the demo app contains a private method in the top level class `App`. You can run the app to execute the code within in the sandbox API. This is a good way to test, if your setup is correct. @@ -196,35 +201,17 @@ Make sure to provide all necessary environment variables: [Jump to the demo app](./app/src/main/java/com/payone/commerce/platform/app/App.java) -## Contributing - -We welcome contributions from the community. If you want to contribute, please follow these steps: - -Fork the repository. -Create a new branch (`git checkout -b feature/feature-branch`). -Make your changes. -Commit your changes (`git commit -am 'feat: add new feature'`). -Push to the branch (`git push origin feature/feature-branch`). -Create a new Pull Request. -Please make sure to follow the coding standards and write appropriate tests for your changes. - -### Build the library +**[back to top](#table-of-contents)** -```sh -./gradlew :lib:build -``` +## Contributing -### Run tests +See [Contributing](./CONTRIBUTING.md) -```sh -./gradlew :lib:test -# or for coverage -./gradlew :lib:jacocoTestReport -``` +**[back to top](#table-of-contents)** -### Releasing the library +## Releasing the library -#### Preparing the Release +### Preparing the Release - Checkout develop branch - Create release branch (release/0.1.0) @@ -239,7 +226,7 @@ git checkout -b release/0.1.0 ./prepare-release.sh 0.1.0 ``` -#### Changelog Generation with Conventional Changelog +### Changelog Generation with Conventional Changelog After calling the `prepare_release.sh` script, it is recommended to manually trigger the changelog generation script (which uses [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog)). @@ -260,12 +247,12 @@ After calling the `prepare_release.sh` script, it is recommended to manually tri ``` - Review and commit the updated changelog before proceeding with the release. -#### Merging the Release Branch +### Merging the Release Branch - Create PR on `develop` branch - Merge `develop` in `main` branch -#### GitHub Action for Release +### GitHub Action for Release After successfully merging all changes to the `main` branch, an admin can trigger a GitHub Action to finalize and publish the release. This action ensures that the release process is automated, consistent, and deploys the new release from the `main` branch. @@ -275,7 +262,7 @@ After successfully merging all changes to the `main` branch, an admin can trigge - Ensure that all changes are committed to the `main` branch. - Navigate to the Actions tab on your GitHub repository and manually trigger the release action for the `main` branch. -#### Optional: Creating a GitHub Release +### Optional: Creating a GitHub Release Once the release has been published to maven central, developers can start using the latest version of the SDK. However, if you want to make the release more visible and include detailed release notes, you can optionally create a GitHub release. @@ -288,6 +275,8 @@ Once the release has been published to maven central, developers can start using Creating a GitHub release is optional, but it can provide additional context and visibility for your users. For detailed guidance, refer to the [GitHub documentation on managing releases](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository). +**[back to top](#table-of-contents)** + ## License This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.