跳到主内容

支付宝

步骤1。 准备

You need a merchant account at Alipay Open Platform.

在访问支付宝之前,需要做一些准备工作。

See preparation before access.

1.1 获取APPID

登录支付宝开放平台控制台并创建一个应用

如何获取APPID支付宝APPID查询指南

1.2 配置证书

Generate an RSA2 certificate per the Alipay doc to obtain appPrivateKey.txt and appPublicKey.txt.

Upload the certificate to the application and download three files: alipayRootCert.crt, appCertPublicKey.crt, alipayCertPublicKey.crt.

Create a Cert named App Cert in Casdoor:

CasdoorValue
TypePayment (x509)
CertificateappCertPublicKey.crt的内容
Private keyappPrivateKey.txt的内容

支付宝应用证书

Create a Cert named Root Cert in Casdoor:

CasdoorValue
TypePayment (x509)
CertificatealipayCertPublicKey.crt的内容
Private keyalipayRootCert.crt的内容

支付宝根证书

步骤2。 创建一个支付宝支付提供商

接下来,在Casdoor中创建一个支付宝支付提供商,填写必要的信息。

CasdoorValue
CategoryPayment
TypeAlipay
Client IDAPPID from step 1.1
CertApp Cert from step 1.2
Root CertRoot Cert from step 1.2

支付宝提供商

步骤3。 为您的产品添加支付宝支付提供商

最后,为您的产品添加支付宝支付提供商,以便用户可以使用支付宝购买产品。

Currency Requirement

Alipay only supports transactions in Chinese Yuan (CNY). When adding Alipay as a payment provider, ensure your product's currency is set to CNY. Products with other currencies will be rejected during creation or update to prevent payment failures.

为产品添加微信支付付款提供商