Skip to content

Commit

Permalink
docs: add Paypal & Payment Overview docs (#535)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chinoholo0807 authored Jul 31, 2023
1 parent 01e317d commit a27f4f2
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/provider/payment/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Overview
description: Add Payment providers to your application
keywords: [Payment]
authors: [Chinoholo0807]
---

If you want to use payment services in Casdoor, you need to create a Payment provider and add it to your products.

![add payment provider](/img/providers/payment/add_payment_provider.png)

To learn how to configure a product, see [Product](/docs/products/product).
After configure a product, you can add Payment providers for the product so that users can purchase the product through the Payment providers.
52 changes: 52 additions & 0 deletions docs/provider/payment/paypal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: PayPal
description: Add PayPal Payment provider to your application
keywords: [PayPal, payment]
authors: [Chinoholo0807]
---

:::note

This is an example of how to configure a **PayPal** Payment provider.

:::

## Step1. Create a PayPal application

First you need to create an application in PayPal.
To access PayPal Developer site, you should have a PayPal business account.
If you don't have an account then [create one](https://www.paypal.com/in/webapps/mpp/account-selection?pros=2) first.

After you create a PayPal business account, login the [Developer Dashboard](https://developer.paypal.com/dashboard/applications/sandbox) via the account and then click on `Create App` under `Apps & Credentials`.

![create a paypal application](/img/providers/payment/paypal_create_app.png)

You can find the `Client ID` and `Secret key` in the basic information of your application.

![paypal application detail](/img/providers/payment/paypal_app_detail.png)

## Step2. Create a PayPal Payment provider

Then create a PayPal Payment provider in Casdoor. Fill the necessary information.

| Name | Name in PayPal |
| ---- | ---- |
|Category | choose `Payment` |
|Type | choose `PayPal` |
|Client ID | `Client ID` obtained from Step1 |
|Client secret | `Secret key` obtained from Step1 |

## Step3. Add the PayPal Payment provider for your product

Finally, Add the PayPal Payment provider for your product so that users can purchase the product using PayPal.

![add paypal payment provider for product](/img/providers/payment/paypal_product.png)

<video src="/video/provider/payment/use_paypal_as_payment_provider.mp4" controls="controls" width="100%"></video>

:::note

The above operations are all performed in the PayPal `Sandbox` mode.
If you want to use it in a live production environment, you need to create an application in PayPal `Live` mode and set `runmode=prod` in Casdoor's configure file `conf/app.conf`.

:::
2 changes: 2 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ module.exports = {
collapsed: true,
link: {type: "generated-index"},
items: [
"provider/payment/overview",
"provider/payment/paypal",
"provider/payment/Alipay",
"provider/payment/WeChatPay",
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/providers/payment/paypal_product.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/providers/payment/paypal_provider.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.

0 comments on commit a27f4f2

Please sign in to comment.