private async Task <ASquare_Payment> GetPaymentDetails(MSquare_Payment mPayment) { var mPaymentTransactions = await SquareMicroService.GetPaymentTransactionSummariesAsync(mPayment.SquarePaymentId, null, null); var mPaymentEvents = await SquareMicroService.GetPaymentEventLogSummariesAsync(mPayment.SquarePaymentId, null, null); var mRefundTransactions = await SquareMicroService.GetRefundTransactionSummariesAsync(null, mPayment.SquarePaymentId, null, null); var mRefundEvents = await SquareMicroService.GetRefundEventLogSummariesAsync(null, mPayment.SquarePaymentId, null, null); var mUser = TryParseUserId.FromSquareCustomerReference(mPayment.SquareCustomerReference, out string userId) ? await UserMicroService.GetUserAsync(userId).ConfigureAwait(false) : null; var funderReference = CreateFunderReference.FromSquarePaymentId(mPayment.SquarePaymentId); var funderId = await FundingMicroService.LookupFunderAsync(funderReference); var result = new ASquare_Payment() { MPayment = mPayment, MPaymentTransactions = mPaymentTransactions, MPaymentEvents = mPaymentEvents, MRefundTransactions = mRefundTransactions, MRefundEvents = mRefundEvents, MUser = mUser, FunderId = funderId }; return(result); }
public SquarePayment( ASquare_Payment aPayment, IApplicationLocale locale) { APayment = aPayment; Locale = locale; }
public SquarePayment CreateSquarePayment(ASquare_Payment aPayment) { return(new SquarePayment(aPayment, Locale)); }