Skip to content

Commit

Permalink
remove redocusaurus due to rohit-gohri/redocusaurus#175
Browse files Browse the repository at this point in the history
  • Loading branch information
lumpi2k committed May 8, 2022
1 parent 73a87d4 commit f741b19
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 31 deletions.
11 changes: 5 additions & 6 deletions docs/checkout-demo/checkout-demo-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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
{
Expand All @@ -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",
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.).
Expand Down
8 changes: 4 additions & 4 deletions docs/checkout-demo/checkout-demo-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 19 additions & 19 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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',
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

1 comment on commit f741b19

@rohit-gohri
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is fixed now btw: rohit-gohri/redocusaurus#175 (comment)

Please sign in to comment.