From f741b1946e1c068c7c40949d8f5046370e75de9d Mon Sep 17 00:00:00 2001 From: lumpi2k Date: Sun, 8 May 2022 20:26:07 +0200 Subject: [PATCH] remove redocusaurus due to https://github.com/rohit-gohri/redocusaurus/issues/175 --- docs/checkout-demo/checkout-demo-details.md | 11 +++--- docs/checkout-demo/checkout-demo-intro.md | 8 ++--- docusaurus.config.js | 38 ++++++++++----------- package.json | 3 +- 4 files changed, 29 insertions(+), 31 deletions(-) diff --git a/docs/checkout-demo/checkout-demo-details.md b/docs/checkout-demo/checkout-demo-details.md index 7ba2444..1fe9297 100644 --- a/docs/checkout-demo/checkout-demo-details.md +++ b/docs/checkout-demo/checkout-demo-details.md @@ -237,7 +237,7 @@ But to make the request, we need to specify entries for the array. Let's go over - `items` - data about our cart items; - `Redirect URLs` section - quite often payment method providers (PayPal, Paydirekt, etc.) redirect the customer from a third party app (our app, for example) onto their own services. In the web world, it means that after the customer hits the button "Pay", they get redirected to e.g. PayPal's website to complete the payment. And then PayPal redirects the customer back to the website (i.e. our app) in which they had initially hit the - "Pay" button. In our app, you'll be able to see it in action in use case ['Pay via Paydirekt'](../README.md#pay-via-paydirekt) + "Pay" button. In our app, you'll be able to see it in action in use case "Pay via Paydirekt" - `Payment data specific to 'clearingtype'` section - different payment methods require different data. For example, to make a card payment, we of course need to know the card number (more specifically, its pseudo card number, which is called `pseudocardpan` in PAYONE's system). But as for Paydirekt, it requires shipping address data, like zip, city, etc. @@ -247,7 +247,7 @@ For more information about the fields, check [this PAYONE's docs page](https://d PAYONE will send you a successful/erroneous response regarding your transaction. A typical response would look like this: -- A successful response (it is sent if paying via a card without 3DSecure step - ['Pay via a card without 3DSecure'](../README.md#pay-via-a-card-without-3dsecure) +- A successful response (it is sent if paying via a card without 3DSecure step ```json { @@ -257,8 +257,7 @@ PAYONE will send you a successful/erroneous response regarding your transaction. } ``` -- A redirect response (this one is sent if paying via a card that comes with a 3DSecure step - ['Pay via a card with 3DSecure'](../README.md#pay-via-a-card-with-3dsecure) - +- A redirect response (this one is sent if paying via a card that comes with a 3DSecure step ```json { "status": "REDIRECT", @@ -348,7 +347,7 @@ showMessageInCheckout(paymentResponse) ### That's it! But we also need to verify the transaction Alright, we are pretty much finished with the payment request flow. But also, PAYONE will send a notification to your app that tells the data about a transaction - its status and other related data. -In our demo app, we receive it straightly after a redirect payment method - ['Pay via Paydirekt'](../README.md#pay-via-paydirekt). +In our demo app, we receive it straightly after a redirect payment method. This important step verifies the status of the transaction - when PAYONE sends such a notification to your app, **it means that the transaction really went fine/with problems**, and you should update the order status @@ -431,7 +430,7 @@ We also have function `getTotalPriceForItems42And43()` inside `pay.php` - it ser calculate prices within our server to prevent hackers from changing data in the front-end. # A note on security -Currently, as the main [Readme](/README.md) suggests, we use `php -S localhost:3000` to spin up the local server. +Currently, as the main Readme suggests, we use `php -S localhost:3000` to spin up the local server. But the problem here is that we are able to access _all_ the files inside our project, even `.env`! In real world, you have to make sure that end users are **not** able to access such files. To do that, you have to tweak settings of your webserver (Apache/Nginx/etc.). diff --git a/docs/checkout-demo/checkout-demo-intro.md b/docs/checkout-demo/checkout-demo-intro.md index b03bc1a..57fd0b0 100644 --- a/docs/checkout-demo/checkout-demo-intro.md +++ b/docs/checkout-demo/checkout-demo-intro.md @@ -20,11 +20,11 @@ The app shows a usage scenario for an e-shop that allows Credit Card, PayPal and As for how to read this README for the first time, we recommend to - first, check out ["Use cases' showcase" section](#use-cases-showcase) - (then you can install the app to be able to play around with it yourself - follow section ["Running the app"](#running-the-app)) -- secondly, read ["Let's do it" section](/_docs/detailed-readme.md#lets-do-it) in the more detailed doc - [Detailed Readme](/_docs/detailed-readme.md) -- and then, read ["Internals" section](/_docs/detailed-readme.md#internals) in the [more detailed Readme](/_docs/detailed-readme.md) +- secondly, read ["Let's do it" section](./checkout-demo-details.md#lets-do-it) in the more detailed doc - [Detailed Readme](./checkout-demo-details.md) +- and then, read ["Internals" section](./checkout-demo-details.md#internals) in the [more detailed Readme](./checkout-demo-details.md) -[Detailed Readme](/_docs/detailed-readme.md) elaborates more on tech details and PAYONE's API concepts. -So, most probably, you _would_ want to check it out. The link to it, again: [the detailed Readme](/_docs/detailed-readme.md). +[Detailed Readme](/docs/checkout-demo/checkout-demo-details.md) elaborates more on tech details and PAYONE's API concepts. +So, most probably, you _would_ want to check it out. The link to it, again: [the detailed Readme](./checkout-demo-details.md). ## Running the app You have two options: you can play around with the app on [Gitpod](https://www.gitpod.io/), an online IDE, or you can diff --git a/docusaurus.config.js b/docusaurus.config.js index 5e93efd..bfcbae0 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -51,24 +51,24 @@ const config = { }, }), ], - [ - 'redocusaurus', - /** @type {import('@redocusaurus').Options} */ - { - // Plugin Options for loading OpenAPI files - specs: [ - { - spec: 'static/PAYONE-Link.yaml', - route: '/api/', - }, - ], - // Theme Options for modifying how redoc renders them - theme: { - // Change with your site colors - primaryColor: '#3d94d1', - }, - }, - ], + // Include redocusaurus for redoc Pages - doesn't work atm: https://github.com/rohit-gohri/redocusaurus/issues/175 + // [ + // 'redocusaurus', + // { + // // Plugin Options for loading OpenAPI files + // specs: [ + // { + // spec: 'static/PAYONE-Link.yaml', + // route: '/api/', + // }, + // ], + // // Theme Options for modifying how redoc renders them + // theme: { + // // Change with your site colors + // primaryColor: '#3d94d1', + // }, + // }, + // ], ], themeConfig: @@ -87,7 +87,7 @@ const config = { position: 'left', label: 'PAYONE Checkout Demo', }, - {to: '/api', label: 'PAYONE Link API', position: 'left'}, + // {to: '/api', label: 'PAYONE Link API', position: 'left'}, { type: 'doc', docId: 'intro', diff --git a/package.json b/package.json index 4c4a833..cbf5d3b 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,7 @@ "clsx": "^1.1.1", "prism-react-renderer": "^1.3.1", "react": "^17.0.2", - "react-dom": "^17.0.2", - "redocusaurus": "^1.0.2" + "react-dom": "^17.0.2" }, "devDependencies": { "@docusaurus/module-type-aliases": "2.0.0-beta.20"