メインコンテンツにスキップ

Take payments with Alipay

This guide explains how to let users pay for your Casdoor products with Alipay.


Learning outcomes​

  • Get the APPID and the certificates of an Alipay merchant application.
  • Store the certificates in Casdoor.
  • Add Alipay as a payment provider and add it to a product.

What you need​


Prepare Alipay​

  1. Create an application in the console of the Alipay Open Platform and note its APPID. See Find the APPID.
  2. Generate an RSA2 key pair as the Alipay documentation describes. You get appPrivateKey.txt and appPublicKey.txt.
  3. Upload the certificate to the application and download three files: alipayRootCert.crt, appCertPublicKey.crt, and alipayCertPublicKey.crt.

Store the certificates in Casdoor​

  1. On the Certs page of the Casdoor admin console, add a certificate named App Cert:

    Casdoor値
    TypePayment (x509)
    CertificateappCertPublicKey.crtの内容
    Private keyappPrivateKey.txtの内容

    App Cert in Casdoor

  2. Add a certificate named Root Cert:

    Casdoor値
    TypePayment (x509)
    CertificatealipayCertPublicKey.crtの内容
    Private keyalipayRootCert.crtの内容

    Root Cert in Casdoor

Add the provider in Casdoor​

  1. Go to Identity > Providers and add a provider with the following values:

    Casdoor値
    Category支払い
    Typeアリペイ
    Client IDAPPID from step 1.1
    CertApp Cert from step 1.2
    Root CertRoot Cert from step 1.2

    Alipay payment provider in Casdoor

  2. Save the provider.

Add the provider to a product​

Add the provider to the Payment providers of the product and save it.

Alipay in the payment providers of a product

情報

Alipay supports only Chinese yuan (CNY). Set the currency of the product to CNY. Casdoor rejects a product with Alipay in another currency when you save it.

See also​