private void hlConfirmPaymentItem_Click(object sender, RoutedEventArgs e) { PaymentInfo pi = ((Hyperlink)sender).DataContext as PaymentInfo; if (pi.IsConfirmed) { MessageBox.Show("This payment has already been confirmed.", "Distributr: Payment Module", MessageBoxButton.OK); return; } _vm.MMoneyAmount = pi.Amount; ListInvoicesViewModel.UnconfirmedReceiptPayment payment = new ListInvoicesViewModel.UnconfirmedReceiptPayment { LineItemId = pi.Id, InvoiceDocReference = pi.InvoiceDocRef, InvoiceId = pi.InvoiceId }; _vm.ConfirmThisPayment(payment, pi.ReceiptDocRef, pi.MMoneyPaymentType, pi.MMoneyPaymentType == "Buy Goods" ? GetTransactionRefNum() : ""); }
public void ConfirmThisPayment(ListInvoicesViewModel.UnconfirmedReceiptPayment payment, string recDocReference, string mMoneyPaymentType, string buyGoodsTransReference) { //isBusyWindow = new BusyWindow(); //isBusyWindow.lblWhatsUp.Content = "Fetching payment notification."; //isBusyWindow.Show(); using (StructureMap.IContainer cont = NestedContainer) { Using<IAuditLogWFManager>(cont).AuditLogEntry("PendingPayment", "Attempted confirm payment to receipt line item Id :" + payment.LineItemId + " For receipt: " + recDocReference); _payment = payment; //_paymentNotifs.Clear(); PaymentTransactionRefId = payment.LineItemId; ClientRequestResponseType type = ClientRequestResponseType.AsynchronousPaymentNotification; if (mMoneyPaymentType.ToLower() == "buy goods" || mMoneyPaymentType.ToLower() == "buy-goods" || mMoneyPaymentType.ToLower() == "buygoods") { type = ClientRequestResponseType.BuyGoodsNotification; } string reqMsg = GetPaymentNotificationRequestJson(PaymentTransactionRefId, buyGoodsTransReference, type); GetPaymentNotification(reqMsg, type); } }