Start work for stripe payments

This commit is contained in:
2025-06-29 19:00:25 -07:00
parent b494fef8cc
commit dc36f91353
11 changed files with 164 additions and 15 deletions
@@ -44,8 +44,18 @@ namespace MistoxWebsite.Server.Controllers {
return "Unable to find account";
}
}
[Route("/api/payment/publickey")]
[HttpGet]
public IActionResult GetPaymentKey() {
try {
return Ok(IPayment._PublicKey);
} catch (Exception ex) {
return NotFound(ex.ToString());
}
}
[Route( "/api/payment/response" )]
[Route("/api/payment/response")]
[HttpPost]
public async Task<IActionResult> paymentWebhook() {
try {
@@ -6,6 +6,7 @@ namespace MistoxWebsite.Server.Controllers.Payment {
public static PaymentType _PaymentType;
public static string _EndpointSecret = "";
public static string _PublicKey = "";
public Task<(bool, string)> TryGetCheckoutToken(string OrderNumber, Account user, Cart[] cart);
public Task ValidatePurchase(string WebHookData, string Headers);