401 Unauthorized error with correct credentials.
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- java
- Lĩnh vực
- api, authentication
Hướng nghiên cứu
Bắt đầu bằng cách so sánh các thuộc tính trong getMyMerchantDetails() với ví dụ getMerchantDetails() đang hoạt động, tập trung vào ID người bán, ID khóa, khóa bí mật, loại xác thực và môi trường chạy. Tái tạo yêu cầu tới https://apitest.cybersource.com/pts/v2/payments và xác minh rằng cấu hình đã sửa trả về phản hồi 201 như mong đợi thay vì 401 Unauthorized.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I followed the documentation and set up my API credentials as below:
public static Properties getMyMerchantDetails() {
Properties props = new Properties();
// HTTP_Signature = http_signature and JWT = jwt
props.setProperty("authenticationType", "http_signature");
props.setProperty("merchantID", "my_web_au");
props.setProperty("runEnvironment", "apitest.cybersource.com");
props.setProperty("merchantKeyId", "my_merchant_id");
props.setProperty("merchantsecretKey", "my_sercret_key");
props.setProperty("useMetaKey", "false");
props.setProperty("enableClientCert", "false");
return props;
}
it gives me 401 unauthorized error:
Response{protocol=http/1.1, code=401, message=Unauthorized, url=https://apitest.cybersource.com/pts/v2/payments}
public static Properties getMerchantDetails() {
Properties props = new Properties();
// HTTP_Signature = http_signature and JWT = jwt
props.setProperty("authenticationType", "http_signature");
props.setProperty("merchantID", "testrest");
props.setProperty("runEnvironment", "apitest.cybersource.com");
props.setProperty("requestJsonPath", "src/main/resources/request.json");
props.setProperty("useMetaKey", "false");
// HTTP Parameters
props.setProperty("merchantKeyId", "ggggggggggg");
props.setProperty("merchantsecretKey", "gggggggggg");
props.setProperty("enableClientCert", "false");
return props;
}
The above gives which is me 201 proper response.
I am sure my credentials are correctly created. Is there anything else I should add or modify to get past authorization?
- Ngôn ngữ chính
- Java
- Star
- 35
- Fork
- 84
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của CyberSource/cybersource-rest-samples-java
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
CyberSource/cybersource-rest-samples-java#62 · 1 bình luận ·
Tất cả issue của CyberSource/cybersource-rest-samples-java
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
apache/rocketmq-dashboard#6610 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Citationcount column sorts alphabetically instead of numericallyCó thể đã có người làm @kpunia306 đã nhận hôm nay. Đang mởstatus: needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
JabRef/jabref#17459 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`RedisList.reversed()` view returns an empty `range` and `trim` removes all elementsCó thể đã có người làm @CCCLL đã nhận hôm nay. Đang mởstatus: waiting-for-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
spring-projects/spring-data-redis#3461 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
javapathfinder/jpf-core#649 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
devops-thiago/ThrillhouseBot#1093 ·
Maintainer thường phản hồi trong vòng 1 ngày