Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sdk 返回出错 #6

Open
mintzhao opened this issue Dec 27, 2015 · 3 comments
Open

sdk 返回出错 #6

mintzhao opened this issue Dec 27, 2015 · 3 comments

Comments

@mintzhao
Copy link

Request to pingpp completed in 779.644538ms
Error encountered from Pingpp: {"type":"invalid_request_error","message":"没有提供合适的 API KEY。需要在 header 中加入已授权的 API KEY 的声明 (如:'Authorization: Bearer YOUR_SECRET_KEY')。"}
{"type":"invalid_request_error","message":"没有提供合适的 API KEY。需要在 header 中加入已授权的 API KEY 的声明 (如:'Authorization: Bearer YOUR_SECRET_KEY')。"}
ERRO[0494] pingpp charge error: {"type":"invalid_request_error","message":"没有提供合适的 API KEY。需要在 header 中加入已授权的 API KEY 的声明 (如:'Authorization: Bearer YOUR_SECRET_KEY')。"}

我查看了sdk,发现请求的地方没有任何关于header的 APIKEY声明

然后我看你们官网的版本是15年11月25更新了,但是现在这个项目好像不是。。。而且版本号对不上

求帮忙

@mintzhao
Copy link
Author

sdk https://github.com/PingPlusPlus/pingpp-go/blob/master/pingpp/pingpp.go 125行。。

一切尽在不言中

@samurai00
Copy link
Contributor

@Mint-Zhao-Chiu

// 设置 API-KEY 
pingpp.Key= "YOUR-KEY"

初始化时,这样就可以了。
这里也有说明
https://pingxx.com/guidance/server/charge/pay

@mintzhao
Copy link
Author

我的后台不止有一个pingpp key, 所以不能用全局的Key。。。而且SendRequest那个函数本来就传递了key这个参数,放着这个参数不用,要用全局的Key,那不是那个key参数白传递了么

@mintzhao mintzhao reopened this Dec 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants