Building successfull urls
This commit is contained in:
parent
a77f42815b
commit
7bca9b1e50
10 changed files with 51 additions and 37 deletions
|
|
@ -95,8 +95,7 @@ namespace Yavsc.ApiControllers
|
|||
if (query.PaymentId!=null)
|
||||
return new BadRequestObjectResult(new { error = "An existing payment process already exists" });
|
||||
query.SelectedProfile = _context.BrusherProfile.Single(p => p.UserId == query.PerformerId);
|
||||
var payment = apiContext.CreatePayment(query, "HairCutCommand", "sale", _logger);
|
||||
|
||||
var payment = Request.CreatePayment("HairCutCommand",apiContext, query, "sale", _logger);
|
||||
switch (payment.state)
|
||||
{
|
||||
case "created":
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ namespace Yavsc.ApiControllers
|
|||
public IActionResult Create()
|
||||
{
|
||||
var apiContext = paymentSettings.CreateAPIContext();
|
||||
Payment result=apiContext.CreatePayment(new Estimate());
|
||||
Payment result= Request.CreatePayment("Command",apiContext,new Estimate());
|
||||
return Ok(Payment.Create(apiContext,result));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue