tantk commited on
Commit
214e2ec
·
1 Parent(s): f8b3b76

fix: use base64 not base64url for payment header decoding

Browse files
Files changed (1) hide show
  1. server.js +1 -1
server.js CHANGED
@@ -97,7 +97,7 @@ function getPayerAddress(req) {
97
  const header =
98
  req.get("payment-signature") || req.get("x-payment") || req.get("PAYMENT-SIGNATURE");
99
  if (!header) return null;
100
- const decoded = JSON.parse(Buffer.from(header, "base64url").toString());
101
  // Decode the transaction XDR to get the source account (payer)
102
  const txXdr = decoded?.payload?.transaction;
103
  if (!txXdr) return null;
 
97
  const header =
98
  req.get("payment-signature") || req.get("x-payment") || req.get("PAYMENT-SIGNATURE");
99
  if (!header) return null;
100
+ const decoded = JSON.parse(Buffer.from(header, "base64").toString());
101
  // Decode the transaction XDR to get the source account (payer)
102
  const txXdr = decoded?.payload?.transaction;
103
  if (!txXdr) return null;