Alipay payment sandbox environment use

Alipay payment sandbox environment use

1. Register. Alipay open platform

1.1 Alipay open platform address

https://openhome.alipay.com/platform/home.htm

1.2 Scope of registration services

Insert picture description here

2. Configure the sandbox

1. Open the sandbox service

Insert picture description here

2. Configure the sandbox

Insert picture description here

The Alipay gateway setting is: https://openapi.alipaydev.com/gateway.do

RSA2 (SHA256) key:

​ Generated using Alipay open platform development assistant

​ Download link of Alipay Open Platform Development Assistant:

https://ideservice.alipay.com/ide/getPluginUrl.htm?clientType=assistant&platform=win&channelType=WEB

​ Generate key

Insert picture description here

​ Fill in the key
Insert picture description here

Fill in the application public key generated by the assistant, and the Alipay public key will be automatically generated.

Configuration complete

3. Use in sandbox environment

1. Download the demo paid on the computer website

https://opendocs.alipay.com/open/270/106291

Insert picture description here

2. Import the project into the development tool
3. Configure AlipayConfig

Insert picture description here

app_id: fill in the APPID provided in the sandbox environment

merchant_private_key: Fill in the application private key generated in the assistant

alipay_public_key: Fill in the Alipay public key generated in the sandbox

Insert picture description here

notify_url, return_url: change the domain name to your own domain name (if you don’t have a domain name, don’t configure it temporarily)

sign_type: RSA2 used here

charset:utf-8

gatewayUrl:https://openapi.alipaydev.com/gateway.do

log_path: Set the directory where logs are generated here

Configuration complete

4. Start the project

Insert picture description here

payment

Insert picture description here

Account password is provided in the sandbox environment

Insert picture description here

Insert picture description here

Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_45355510/article/details/112428280