Closed Insadem closed 1 year ago
Unfortunately, I don't repeat your case. You may try to use this code:
[HttpPost("{token}")]
public async Task<IActionResult> PostAsync(
[FromBody] Update update,
string token,
CancellationToken cancellationToken = default)
{
if (update is not null &&
this.HttpContext.Request.Headers.TryGetValue("crypto-pay-api-signature", out var signature) &&
CryptoPayHelper.CheckSignature(signature, token, update) &&
update.UpdateType == UpdateTypes.invoice_paid)
{
return this.Ok();
}
return this.BadRequest();
}
Pay attention, before call CheckSignature
there are check update is not null
and update.UpdateType == UpdateTypes.invoice_paid
Triple checked everything, I'm 100% sure that it's either cryptopay issue, or this library. Try to make about 10 different purchases
I checked again. The error is not reproduced.
As I stated in title, CheckSignature doesn't work correct. I don't know is it because of this library, or cryptopay in general has this issue. P.S: I respond with code 400, it retries, but still no luck. This only happens to random update objects