Stripe Q64.“No signatures found matching the expected signature for payload”.$ expectedSignature is not included in $ signatures

StripeQA

目次一覧

 状態:回答待  閲覧数:586  投稿日:2019-08-22  更新日:2019-08-22  
Q64

Q64

 閲覧数:293 投稿日:2019-08-22 更新日:2019-08-22 

Q64


“No signatures found matching the expected signature for payload”.$ expectedSignature is not included in $ signatures
2019/8/22
The code where the error occurs.
webhook.php
\Stripe\Stripe::setApiKey('xxxx');
$endpoint_secret = 'whsec_xxxx';
$payload = @file_get_contents('php://input');
$sig_header = $_SERVER['HTTP_STRIPE_SIGNATURE'];
$event = null;
try {
 $event = \Stripe\Webhook::constructEvent(
     $payload, $sig_header, $endpoint_secret
 );
} catch(\UnexpectedValueException $e) {
   http_response_code(400);
   exit();
} catch(\Stripe\Error\SignatureVerification $e) {
   //An error is caught here
}


error message
No signatures found matching the expected signature for payload

▼stripe-php/lib/WebhookSignature.php
$signatureFound = false;
foreach ($signatures as $signature) {
   if (Util\Util::secureCompare($expectedSignature, $signature)) {
       $signatureFound = true;
       break;
   }
}
if (!$signatureFound) {
   throw new Error\SignatureVerification(
       "No signatures found matching the expected signature for payload",
       $header,
       $payload
   );


Results of debugging
$ expectedSignature is not included in $ signatures
'-----signatures-----'
array (
 0 => '171abxxxx',
)
'-----expectedSignature-----'
'd1a55xxxx'


"No signatures found matching the expected signature for payload".$ expectedSignature is not included in $ signatures


Q63.No signatures found matching the expected signature for payload について

Stripe Q65.Connect Standard で連結されているStripeアカウントの違いについて

コメント投稿(ログインが必要)



類似度ページランキング
順位 ページタイトル抜粋
1 Q63.No signatures found matching the expected signature for payload について 24
2 Stripe Q64.“No signatures found matching the expected signature for payload”.$ expectedSignature is not included in $ signatures 23
3 Stripe Q60. Checkout\SessionオブジェクトとPaymentIntentオブジェクトの関係性は1対1ですか? 20
4 Stripe Q48。「Checkout\Session - server」「Charge」「PaymentIntent」の使い分け方 19
5 Stripe Q62.Webhook::constructEventで、SignatureVerificationエラーになるのですが… 19
6 Stripe Q25。Why is it an error to use “token_xxxx” not associated with a Customer object for payment? 19
7 Stripe Q9。Checkout beta version で、webhookを受け取ると、client_reference_idがNULL 19
8 Stripe Q46。Direct Charges で手数料聴取する場合、'payment_intent_data'の「有り」「無し」の違いは? 19
9 Purchase Fulfillment 19
10 Stripe Q16。PaymentIntentの支払いで郵便番号入力を求められる。Radar rules の ZIP code を無効にしているのに 19
11 Stripe Payments > COLLECTING PAYMENT DETAILS > Checkout 19
12 We're sorry, we can't log you in. 18
13 Stripe Q51.Connect Standard アカウント連結後の返り値で、"refresh_token”も保存した方が良いですか? 18
14 Stripe Billing > Quickstart / クイックスタート 18
15 Stripe Q38。Difference between “paymentIntent.status === 'succeeded'” and “payment_intent.succeeded event of Webhook” 18
16 Stripe Q8。Stripe Checkout public beta version について 18
17 Stripe Payments > Quickstart / クイックスタート 18
18 Visa Global Security Summits 18
19 Stripe Q56. 作成したCheckout\Sessionオブジェクトが破棄されるタイミングは? 18
20 Stripe Q70.「checkout.session.completed イベント」と「charge.succeeded イベント」と「application_fee.created イベント」の違いについて 18
2024/4/23 15:25 更新
週間人気ページランキング / 4-16 → 4-22
順位 ページタイトル抜粋 アクセス数
1 YouTube | 動画サービス(課金販売できるプラットフォーム) 9
2 EMVレベル1 / EMVレベル2 / EMVCo とは? 4
2 EMVCo | クレジットカード仕様(仕様) 4
3 pixivFANBOX | クリエイター支援プラットフォーム(課金販売できるプラットフォーム) 3
3 プリペイドカード | カード 3
4 ログイン 2
4 Saving Payment Methods / 支払い方法を保存する 2
4 振込 | 送金 2
4 Stripe webhook 配信の問題 / 実際に受け取った警告メールの受信例 2
4 Stripe Q73.CheckoutのSessionオブジェクトをcreateする際、'payment_intent_data'内の'metadata'として渡したデータを、webhookで受け取る件について | QA(Stripe) 2
4 Stripe Q55.Checkout\Session::createする際の、'client_reference_id'パラメータと'payment_intent_data.metadata'パラメータの違いについて | QA(Stripe) 2
4 Off-session Payments with Payment Intents / Payment Intents を使用したオフセッション支払 2
4 Stripe Q32。Webhook のエンドポイントから適切な値を返さなかったときの停止措置について | QA(Stripe) 2
4 Stripe Q16。PaymentIntentの支払いで郵便番号入力を求められる。Radar rules の ZIP code を無効にしているのに | QA(Stripe) 2
5 「払い戻し」と「チャージバック」の違い | 違い 1
5 支払い 1
5 Stripe Q65.Connect Standard で連結されているStripeアカウントの違いについて | QA(Stripe) 1
5 Stripe Q23。イベントで「新しい支払元が追加されました」と表示されているのに、「支払元がありません」 | QA(Stripe) 1
5 Payment Intents Migration Guide / Payment Intents 移行ガイド 1
5 Stripe Q66.Webhookエンドポイントが、"connect"内容も含むかどうかを確認するためにはどうすれば良いですか? | QA(Stripe) 1
2024/4/23 1:01 更新