change sdk
This commit is contained in:
parent
7f3ba37bbb
commit
83c54628dd
|
@ -13,13 +13,14 @@ func TestToken_Client(t *testing.T) {
|
|||
MchCertPath: "/Users/lsxd/code/php/yxxt/market/config/alipaycash/appCertPublicKey_2021004100663111.crt",
|
||||
RootCertPath: "/Users/lsxd/code/php/yxxt/market/config/alipaycash/alipayRootCert.crt",
|
||||
}
|
||||
resp, err := d.Client(context.Background(), "349feb5fb58e455da1b00a7748ceMD68")
|
||||
resp, err := d.Client(context.Background(), "ecfb8b3f91e44ca6b94b8830fcd5BF88")
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
} else {
|
||||
if resp.IsSuccess() {
|
||||
t.Logf("Response: %+v", resp.Response)
|
||||
} else {
|
||||
t.Errorf("resp: %+v", resp)
|
||||
t.Errorf("ErrorResponse: %+v", resp.ErrorResponse)
|
||||
t.Errorf("ErrorResponse Msg: %+v", resp.ErrorResponse.Msg)
|
||||
t.Errorf("ErrorResponse SubCode: %+v", resp.ErrorResponse.SubCode)
|
||||
|
|
|
@ -33,8 +33,8 @@ type AlipayTokenSuccessResponse struct {
|
|||
}
|
||||
|
||||
type AlipayTokenResponse struct {
|
||||
ErrorResponse *alipay.ErrorResponse `json:"error_response"`
|
||||
Response *AlipayTokenSuccessResponse `json:"alipay_system_oauth_token_response"`
|
||||
ErrorResponse *alipay.ErrorResponse `json:"error_response,omitempty"`
|
||||
Response *AlipayTokenSuccessResponse `json:"alipay_system_oauth_token_response,omitempty"`
|
||||
Sign string `json:"sign"`
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue