Webhook tests + FIXES + DOCS (#5686)

* webhook tests

* fixes and add docs

* Do not update FormResponse and StoreId in update/create PullPayment

---------

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
This commit is contained in:
Andrew Camilleri
2024-02-23 09:44:42 +01:00
committed by GitHub
parent 10bb75ce0e
commit 5c98ca180a
9 changed files with 619 additions and 25 deletions

View File

@@ -168,6 +168,8 @@ namespace BTCPayServer.Controllers.Greenfield
Status = Client.Models.PaymentRequestData.PaymentRequestStatus.Pending,
Created = DateTimeOffset.UtcNow
};
request.FormResponse = null;
request.StoreId = storeId;
pr.SetBlob(request);
pr = await _paymentRequestRepository.CreateOrUpdatePaymentRequest(pr);
return Ok(FromModel(pr));
@@ -196,6 +198,9 @@ namespace BTCPayServer.Controllers.Greenfield
}
var updatedPr = pr.First();
var blob = updatedPr.GetBlob();
request.FormResponse = blob.FormResponse;
request.StoreId = storeId;
updatedPr.SetBlob(request);
return Ok(FromModel(await _paymentRequestRepository.CreateOrUpdatePaymentRequest(updatedPr)));