private async Task <IGrainReminder> ChargeUserCredit(Immutable <long> userId, long orderId, decimal totalPrice) { var userGrain = GrainFactory.GetGrain <IUser>(userId.Value); var reminder = await RegisterOrUpdateReminder(GetChargeUserCreditReminderName(), CheckDuration, CheckDuration); await userGrain.ChargeCredit(orderId.AsImmutable(), totalPrice.AsImmutable()); return(reminder); }
private async Task <IGrainReminder> ChargeCreditCard(Immutable <long> userId, long orderId, decimal totalPrice) { var creditCardPos = GrainFactory.GetGrain <ICreditCardPos>(orderId); var reminder = await RegisterOrUpdateReminder(GetChargeCreditCardReminderName(), CheckDuration, CheckDuration); await creditCardPos.Charge(userId, totalPrice.AsImmutable()); return(reminder); }