1. 程式人生 > 其它 >LeetCode - Easy - 141. Linked List Cycle

LeetCode - Easy - 141. Linked List Cycle

1.支付寶支付流程

https://www.lanqiao.cn/vip

2.新建支付寶應用

# 訪問"支付寶開發平臺"登入,可以訪問開發者中心 https://open.alipay.com/platform/home.htm 
# 可以參考"電腦網站支付" 熟悉電腦支付整體流程 https://docs.open.alipay.com/270/105899/

2.1 第一步:建立應用(這裡使用沙箱環境測試)

2.2 按照官方要求生成祕鑰

生成祕鑰參考官網: https://docs.open.alipay.com/291/105971

  • 一定要儲存兩個東西
  • 支付寶公鑰:我傳送資訊給支付寶,使用支付寶公鑰進行加密
  • app私鑰(我自己生成的):支付寶給我傳送的資訊是用我剛剛上傳的app公鑰加密,只有我
    自己的私鑰可以解密

2.3 把生成的app公鑰貼上到沙箱環境的app中

沙箱環境地址: https://openhome.alipay.com/platform/appDaily.htm?tab=info

2.4 檢視沙箱環境賬號和密碼

# 買家資訊 買家賬號[email protected] 
登入密碼111111 支付密碼111111 
# 商家賬號[email protected] 
商戶UID2088102180143385 登入密碼111111

3.測試支付寶獲取支付寶掃碼連結

3.1 支付寶開發網址

支付寶開放平臺: https://open.alipay.com/platform/home.htm 
支付寶沙箱環境: https://openhome.alipay.com/platform/appDaily.htm?tab=info 
支付寶開發者文件:https://openhome.alipay.com/developmentDocument.htm 
電腦網站支付流程:https://docs.open.alipay.com/270 
生成簽名:https://docs.open.alipay.com/291/106103/ 
python-alipay-adk : https://github.com/fzlee/alipay/blob/master/README.zh-hans.md

3.2 說明

  • 阿里官方沒有提供python對接支付的sdk,但是python庫中有非官方的sdk包可以使用
  • python-alipay-adk : https://github.com/fzlee/alipay/blob/master/README.zh-hans.md
  • 使用起來非常簡單,只要傳入幾個必要的引數就可以完成
  • 由於支付對安全要求很高,所以要理解對接支付寶安全的流程: 公鑰加密、私鑰解密 這八個字

3.3 app_private_key.pem app私鑰

-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAi5e1q5cfTh9m+KhuqH17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