Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerry committed Aug 15, 2019
1 parent 205c6ea commit a031eed
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 36 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
* 统一收单交易结算接口:client.AliPayTradeOrderSettle()
* 统一收单线下交易预创建(用户扫商品收款码):client.AliPayTradePrecreate()
* 单笔转账到支付宝账户接口(商户给支付宝用户转账):client.AlipayFundTransToaccountTransfer()
* 换取授权访问令牌(获取access_token,user_id等信息):client.AliPaySystemOauthToken()
* 获取芝麻信用分:client.ZhimaCreditScoreGet()

## 支付宝公共API
Expand Down
1 change: 0 additions & 1 deletion README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ The Golang SDK for WeChat and AliPay
* alipay.trade.order.settle:client.AliPayTradeOrderSettle()
* alipay.trade.precreate(User Scan Merchant):client.AliPayTradePrecreate()
* alipay.fund.trans.toaccount.transfer:client.AlipayFundTransToaccountTransfer()
* alipay.system.oauth.token(obtain access_token, user_id and so on):client.AliPaySystemOauthToken()
* zhima.credit.score.get:client.ZhimaCreditScoreGet()

## Alipay Public API
Expand Down
3 changes: 0 additions & 3 deletions alipay_service_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,15 +331,13 @@ func AliPaySystemOauthToken(appId, privateKey, grantType, codeOrToken string) (r
//向支付宝发送请求
func doAliPay(appId, privateKey string, body BodyMap, method string) (bytes []byte, err error) {
//===============生成参数===================
//pubBody := make(BodyMap)
body.Set("app_id", appId)
body.Set("method", method)
body.Set("format", "JSON")
body.Set("charset", "utf-8")
body.Set("sign_type", "RSA2")
body.Set("timestamp", time.Now().Format(TimeLayout))
body.Set("version", "1.0")
//pubBody.Set("biz_content", string(bodyStr))
//===============获取签名===================
pKey := FormatPrivateKey(privateKey)
sign, err := getRsaSign(body, "RSA2", pKey)
Expand All @@ -350,7 +348,6 @@ func doAliPay(appId, privateKey string, body BodyMap, method string) (bytes []by
//fmt.Println("rsaSign:", sign)
//===============发起请求===================
urlParam := FormatAliPayURLParam(body)
//fmt.Println("urlParam:", urlParam)

var url string
agent := HttpAgent()
Expand Down
30 changes: 0 additions & 30 deletions examples/alipay/alipay_AliPaySystemOauthToken.go

This file was deleted.

2 changes: 1 addition & 1 deletion examples/alipay/alipay_ServiceApi.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func FormatAliPayPublicKey() {
fmt.Println(pKey)
}

func AliPaySystemOauthToken2() {
func AliPaySystemOauthToken() {
privateKey := "MIIEogIBAAKCAQEAy+CRzKw4krA2RzCDTqg5KJg92XkOY0RN3pW4sYInPqnGtHV7YDHu5nMuxY6un+dLfo91OFOEg+RI+WTOPoM4xJtsOaJwQ1lpjycoeLq1OyetGW5Q8wO+iLWJASaMQM/t/aXR/JHaguycJyqlHSlxANvKKs/tOHx9AhW3LqumaCwz71CDF/+70scYuZG/7wxSjmrbRBswxd1Sz9KHdcdjqT8pmieyPqnM24EKBexHDmQ0ySXvLJJy6eu1dJsPIz+ivX6HEfDXmSmJ71AZVqZyCI1MhK813R5E7XCv5NOtskTe3y8uiIhgGpZSdB77DOyPLcmVayzFVLAQ3AOBDmsY6wIDAQABAoIBAHjsNq31zAw9FcR9orQJlPVd7vlJEt6Pybvmg8hNESfanO+16rpwg2kOEkS8zxgqoJ1tSzJgXu23fgzl3Go5fHcoVDWPAhUAOFre9+M7onh2nPXDd6Hbq6v8OEmFapSaf2b9biHnBHq5Chk08v/r74l501w3PVVOiPqulJrK1oVb+0/YmCvVFpGatBcNaefKUEcA+vekWPL7Yl46k6XeUvRfTwomCD6jpYLUhsAKqZiQJhMGoaLglZvkokQMF/4G78K7FbbVLMM1+JDh8zJ/DDVdY2vHREUcCGhl4mCVQtkzIbpxG++vFg7/g/fDI+PquG22hFILTDdtt2g2fV/4wmkCgYEA6goRQYSiM03y8Tt/M4u1Mm7OWYCksqAsU7rzQllHekIN3WjD41Xrjv6uklsX3sTG1syo7Jr9PGE1xQgjDEIyO8h/3lDQyLyycYnyUPGNNMX8ZjmGwcM51DQ/QfIrY/CXjnnW+MVpmNclAva3L33KXCWjw20VsROV1EA8LCL94BUCgYEA3wH4ANpzo7NqXf+2WlPPMuyRrF0QPIRGlFBNtaKFy0mvoclkREPmK7+N4NIGtMf5JNODS5HkFRgmU4YNdupA2I8lIYpD+TsIobZxGUKUkYzRZYZ1m1ttL69YYvCVz9Xosw/VoQ+RrW0scS5yUKqFMIUOV2R/Imi//c5TdKx6VP8CgYAnJ1ADugC4vI2sNdvt7618pnT3HEJxb8J6r4gKzYzbszlGlURQQAuMfKcP7RVtO1ZYkRyhmLxM4aZxNA9I+boVrlFWDAchzg+8VuunBwIslgLHx0/4EoUWLzd1/OGtco6oU1HXhI9J9pRGjqfO1iiIifN/ujwqx7AFNknayG/YkQKBgD6yNgA/ak12rovYzXKdp14Axn+39k2dPp6J6R8MnyLlB3yruwW6NSbNhtzTD1GZ+wCQepQvYvlPPc8zm+t3tl1r+Rtx3ORf5XBZc3iPkGdPOLubTssrrAnA+U9vph61W+OjqwLJ9sHUNK9pSHhHSIS4k6ycM2YAHyIC9NGTgB0PAoGAJjwd1DgMaQldtWnuXjvohPOo8cQudxXYcs6zVRbx6vtjKe2v7e+eK1SSVrR5qFV9AqxDfGwq8THenRa0LC3vNNplqostuehLhkWCKE7Y75vXMR7N6KU1kdoVWgN4BhXSwuRxmHMQfSY7q3HG3rDGz7mzXo1FVMr/uE4iDGm0IXY="
rsp, err := gopay.AliPaySystemOauthToken("2016091200494382", privateKey, "", "06e8961891d647c0ac99bb1cebe7SE69")
if err != nil {
Expand Down

0 comments on commit a031eed

Please sign in to comment.