From a682772cf05140be917345333f658c162955b4a8 Mon Sep 17 00:00:00 2001 From: Dirk Ehrhardt Date: Mon, 19 Aug 2024 16:19:02 +0200 Subject: [PATCH 1/3] chore: fix typo in property name --- src/interfaces/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interfaces/index.ts b/src/interfaces/index.ts index 608fbce..f254530 100644 --- a/src/interfaces/index.ts +++ b/src/interfaces/index.ts @@ -1231,7 +1231,7 @@ export interface OrderLineDetailsInput { * Used for PAYONE Buy Now, Pay Later (BNPL). * @example https://shop.url/watches/watch01 */ - productURL?: string; + productUrl?: string; /** * Format: uri * @description URL of a product image. From d8c9f8afda4c91895b24f22f9102326f6daceb09 Mon Sep 17 00:00:00 2001 From: Dirk Ehrhardt Date: Wed, 21 Aug 2024 10:43:39 +0200 Subject: [PATCH 2/3] chore: update namings --- applepay-demo/README.md | 2 +- applepay-demo/index.js | 2 +- creditcard-tokenizer-demo/index.html | 2 +- src/interfaces/PCPCreditCardTokenizer.interfaces.ts | 2 +- src/lib/PCPCreditCardTokenizer.ts | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/applepay-demo/README.md b/applepay-demo/README.md index 966077e..f229962 100644 --- a/applepay-demo/README.md +++ b/applepay-demo/README.md @@ -8,7 +8,7 @@ This demo application showcases the integration of Apple Pay on the web using th - **SDK Integration**: The demo uses the `pcp-client-javascript-sdk`, which simplifies the Apple Pay session management. You only need to pass the correct configuration and a DOM selector. - **Pre-configured Apple Pay Button**: A ready-to-use Apple Pay button appears on your webpage, allowing users to open the payment sheet, select a payment method, adjust shipping and billing information, and verify themselves using Face ID or Touch ID. -- **Payment Token and More**: The `onpaymentauthorized` callback returns not only a payment token but also additional billing and shipping information that can be used to process payments with Payone. +- **Payment Token and More**: The `onpaymentauthorized` callback returns not only a payment token but also additional billing and shipping information that can be used to process payments with PAYONE. ## Setup diff --git a/applepay-demo/index.js b/applepay-demo/index.js index 687035b..4b7c649 100644 --- a/applepay-demo/index.js +++ b/applepay-demo/index.js @@ -98,7 +98,7 @@ app.post('/process-payment', async (req, res) => { console.log('Shipping contact:', req.body.shippingContact); const body = req.body; - // Process the payment with Payone here + // Process the payment with PAYONE here res.status(200).send({ success: true, body }); }); diff --git a/creditcard-tokenizer-demo/index.html b/creditcard-tokenizer-demo/index.html index 53271ff..b7ec4cf 100644 --- a/creditcard-tokenizer-demo/index.html +++ b/creditcard-tokenizer-demo/index.html @@ -99,7 +99,7 @@

-

Response from Payone Client-API

+

Response from PAYONE Client-API

Nothing received yet.
diff --git a/src/interfaces/PCPCreditCardTokenizer.interfaces.ts b/src/interfaces/PCPCreditCardTokenizer.interfaces.ts index bf1cd0a..170561b 100644 --- a/src/interfaces/PCPCreditCardTokenizer.interfaces.ts +++ b/src/interfaces/PCPCreditCardTokenizer.interfaces.ts @@ -302,7 +302,7 @@ export interface Config { */ formNotCompleteCallback?: () => void; /** - * Define an ID for the Payone script to be loaded. If not set, a default ID (payone-hosted-script) will be used. + * Define an ID for the PAYONE script to be loaded. If not set, a default ID (payone-hosted-script) will be used. */ payOneScriptId?: string; } diff --git a/src/lib/PCPCreditCardTokenizer.ts b/src/lib/PCPCreditCardTokenizer.ts index 40fd7ad..e4877a1 100644 --- a/src/lib/PCPCreditCardTokenizer.ts +++ b/src/lib/PCPCreditCardTokenizer.ts @@ -28,9 +28,9 @@ export class PCPCreditCardTokenizer { private ccIconsContainerElement?: HTMLElement; /** - * Creates a new instance of the PCPCreditCardTokenizer, initializes the Payone script, and attaches event handlers to the submit button. + * Creates a new instance of the PCPCreditCardTokenizer, initializes the PAYONE script, and attaches event handlers to the submit button. * @param {Config} config - The configuration object sets up styles, auto card type detection, credit card icons, and callbacks - * @param {Omit} request - The request object contains the parameters for the Payone API + * @param {Omit} request - The request object contains the parameters for the PAYONE API * @param {string} pmiPortalKey - The pmiPortalKey is used to create a hash for the request object * @returns {Promise} A new instance of the PCPCreditCardTokenizer */ @@ -64,7 +64,7 @@ export class PCPCreditCardTokenizer { this.createCreditCardIconElements(this.config.ccIcons); } - // add callback function to window object so it can be called by the Payone script + // add callback function to window object so it can be called by the PAYONE script window.payCallback = this.payCallback; } @@ -190,7 +190,7 @@ export class PCPCreditCardTokenizer { script.id = scriptId; script.onload = () => resolve(); script.onerror = () => - reject(new Error('Failed to load the Payone script.')); + reject(new Error('Failed to load the PAYONE script.')); document.head.appendChild(script); }); } From 253f57ced1b48d2cdf584b4a0b6dfd9df372725e Mon Sep 17 00:00:00 2001 From: Dirk Ehrhardt Date: Wed, 21 Aug 2024 12:09:03 +0200 Subject: [PATCH 3/3] chore: add github release documentation --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 1040186..7f6b9b7 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ Welcome to the PAYONE Commerce Platform Client JavaScript SDK for the PAYONE Com - [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) - [Minimum Supported Browser Versions](#minimum-supported-browser-versions) - [License](#license) @@ -730,6 +731,19 @@ After successfully merging all changes to the `master` branch, an admin can trig - Ensure that all changes are committed to the `master` branch. - Navigate to the Actions tab on your GitHub repository and manually trigger the release action for the `master` branch. +### Optional: Creating a GitHub Release + +Once the release has been published to npm, 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. + +1. **Navigate to the Releases Page**: Go to the "Releases" section of your repository on GitHub. +2. **Draft a New Release**: Click "Draft a new release". +3. **Tag the Release**: Select the version tag that corresponds to the version you just published on npm (e.g., `v0.1.0`). +4. **Release Title**: Add a descriptive title for the release (e.g., `v0.1.0 - Initial Release`). +5. **Auto-Generated Release Notes**: GitHub can automatically generate release notes based on merged pull requests and commit history. You can review these notes, adjust the content, and highlight important changes. +6. **Publish the Release**: Once you're satisfied with the release notes, click "Publish release". + +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). + By following these steps, you can efficiently manage and streamline the release process for the PAYONE Commerce Platform Client JavaScript SDK, ensuring that the new release is published from the `master` branch while maintaining consistency and reliability. **[back to top](#table-of-contents)**