save the token in the write field (was not broking the payment)
This commit is contained in:
parent
0d6f30ee09
commit
e4b73377de
1 changed files with 3 additions and 3 deletions
|
|
@ -187,6 +187,7 @@ namespace Yavsc.ApiControllers
|
||||||
_logger.LogError(ex.Message);
|
_logger.LogError(ex.Message);
|
||||||
return new HttpStatusCodeResult(500);
|
return new HttpStatusCodeResult(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (payment==null) {
|
if (payment==null) {
|
||||||
_logger.LogError("Error doing SetExpressCheckout, aborting.");
|
_logger.LogError("Error doing SetExpressCheckout, aborting.");
|
||||||
_logger.LogError(JsonConvert.SerializeObject(Startup.PayPalSettings));
|
_logger.LogError(JsonConvert.SerializeObject(Startup.PayPalSettings));
|
||||||
|
|
@ -200,9 +201,8 @@ namespace Yavsc.ApiControllers
|
||||||
var dbinfo = new PayPalPayment
|
var dbinfo = new PayPalPayment
|
||||||
{
|
{
|
||||||
ExecutorId = User.GetUserId(),
|
ExecutorId = User.GetUserId(),
|
||||||
PaypalPayerId = payment.Token,
|
CreationToken = payment.Token,
|
||||||
CreationToken = null,
|
State = payment.Ack.ToString()
|
||||||
State = "inserted"
|
|
||||||
};
|
};
|
||||||
await _context.SaveChangesAsync(User.GetUserId());
|
await _context.SaveChangesAsync(User.GetUserId());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue