Start work for stripe payments
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user