save the token in the write field (was not broking the payment)

main
Paul Schneider 9 years ago
parent f76bfca9b5
commit c73f3a9c47
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…