401 Unauthorized error with correct credentials.
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- java
- 領域
- api, authentication
調査の方向性
まず、getMyMerchantDetails() のプロパティを、動作する例である getMerchantDetails() と比較し、加盟店 ID、キー ID、シークレットキー、認証タイプ、実行環境に注目します。https://apitest.cybersource.com/pts/v2/payments に対するリクエストを再現し、修正後の設定が 401 Unauthorized ではなく、期待される 201 レスポンスを返すことを確認します。
索引モデルが issue の本文から書いたものです。
説明
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?
- 主要言語
- Java
- スター
- 35
- フォーク
- 84
- 平均マージ
- 37分
- マージ済み PR(30日)
- 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CyberSource/cybersource-rest-samples-java のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
CyberSource/cybersource-rest-samples-java#62 · コメント 1 件 ·
CyberSource/cybersource-rest-samples-java の issue をすべて見る
似ている issue
-
area/plugin
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
kestra-io/plugin-kestra#190 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
apache/rocketmq-dashboard#5064 ·