[update] 新增stripe聚合支付方式,采用全新的paymentIntents API

[fix] 修改支付方式中的小bug
[update] 将stripe-php版本升级至最新
This commit is contained in:
LinusX
2024-06-05 07:55:49 +08:00
parent 59f40dfd02
commit 261487437b
3 changed files with 176 additions and 4 deletions
+2 -3
View File
@@ -76,14 +76,13 @@ class BTCPay
//NOT BTCPay-Sig
//API doc is WRONG!
$headerName = 'Btcpay-Sig';
$signraturHeader = isset($headers[$headerName]) ? $headers[$headerName] : '';
$signatureHeader = isset($headers[$headerName]) ? $headers[$headerName] : '';
$json_param = json_decode($payload, true);
$computedSignature = "sha256=" . \hash_hmac('sha256', $payload, $this->config['btcpay_webhook_key']);
if (!self::hashEqual($signraturHeader, $computedSignature)) {
if (!self::hashEqual($signatureHeader, $computedSignature)) {
throw new ApiException('HMAC signature does not match', 400);
return false;
}
//get order id store in metadata