mirror of
https://github.com/D4M13N-D3V/comissions-app-core-api.git
synced 2025-03-14 10:04:55 +00:00
fix: api now returns payment info
This commit is contained in:
parent
dcca20068e
commit
2af2fef7a0
@ -843,6 +843,8 @@ public class RequestsController : Controller
|
|||||||
var paymentUrl = _paymentService.Charge(request.Id,request.Artist.StripeAccountId,Convert.ToDouble(request.Amount));
|
var paymentUrl = _paymentService.Charge(request.Id,request.Artist.StripeAccountId,Convert.ToDouble(request.Amount));
|
||||||
request.Accepted = true;
|
request.Accepted = true;
|
||||||
request.AcceptedDate = DateTime.UtcNow;
|
request.AcceptedDate = DateTime.UtcNow;
|
||||||
|
request.Paid = false;
|
||||||
|
request.PaymentUrl = paymentUrl;
|
||||||
_dbContext.Entry(request).State = EntityState.Modified;
|
_dbContext.Entry(request).State = EntityState.Modified;
|
||||||
await _dbContext.SaveChangesAsync();
|
await _dbContext.SaveChangesAsync();
|
||||||
var newTriggerModel = new EventCreateData()
|
var newTriggerModel = new EventCreateData()
|
||||||
|
@ -14,4 +14,7 @@ public class RequestModel
|
|||||||
public DateTime? DeclinedDate { get; set; }
|
public DateTime? DeclinedDate { get; set; }
|
||||||
public bool Completed { get; set; } = false;
|
public bool Completed { get; set; } = false;
|
||||||
public DateTime? CompletedDate { get; set; }
|
public DateTime? CompletedDate { get; set; }
|
||||||
|
public string? PaymentUrl { get; set; }
|
||||||
|
public DateTime? PaidDate { get; set; }
|
||||||
|
public bool Paid { get; set; }
|
||||||
}
|
}
|
@ -16,6 +16,9 @@ public static class RequestModelExtensions
|
|||||||
CompletedDate = sellerProfile.CompletedDate,
|
CompletedDate = sellerProfile.CompletedDate,
|
||||||
Declined = sellerProfile.Declined,
|
Declined = sellerProfile.Declined,
|
||||||
DeclinedDate = sellerProfile.DeclinedDate,
|
DeclinedDate = sellerProfile.DeclinedDate,
|
||||||
|
Paid = sellerProfile.Paid,
|
||||||
|
PaidDate = sellerProfile.PaidDate,
|
||||||
|
PaymentUrl = sellerProfile.PaymentUrl,
|
||||||
Message = sellerProfile.Message
|
Message = sellerProfile.Message
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user